Created
April 14, 2014 00:46
-
-
Save yocontra/10608501 to your computer and use it in GitHub Desktop.
Testing WebRTC in Chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var os = require('os'); | |
var path = require('path'); | |
var randomDir = function() { | |
return path.join(os.tmpdir(), String(Math.floor(Math.random()*1000))); | |
}; | |
var openit = function(url) { | |
var chromeLocation = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'; | |
var args = [ | |
url, | |
'--no-first-run', | |
'--disable-java', | |
'--new-window', | |
'--incognito', | |
'--disable-extensions', | |
'--disable-plugins', | |
'--disable-user-media-security', | |
'--use-fake-ui-for-media-stream', | |
'--use-fake-device-for-media-stream', | |
'--user-data-dir='+randomDir(), | |
]; | |
return spawn(chromeLocation, args, {stdio: 'inherit'}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment