Skip to content

Instantly share code, notes, and snippets.

@yocontra
Created April 14, 2014 00:46
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yocontra/10608501 to your computer and use it in GitHub Desktop.
Save yocontra/10608501 to your computer and use it in GitHub Desktop.
Testing WebRTC in Chrome
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