Permalink
Browse files

Added 'queue' option to change queue url.

  • Loading branch information...
1 parent 3df94c6 commit 103a599533bd911816a9e41c0b126fca4d185edf @jpemartins committed Jun 19, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/peerconnection.js
View
@@ -17,6 +17,7 @@ if (env.node) {
env.argv = require('optimist').argv;
env.caller = !env.argv.callee;
env.capture = env.argv.capture || "audio,video"
+ env.queue = env.argv.queue || "127.0.0.1:9999"
}
if (env.browser) {
@@ -41,8 +42,8 @@ console.log("Arguments: ", env.argv);
console.log("Environment: caller=%s, capture=%s, browser=%s, node=%s", env.caller, env.capture, env.browser, env.node);
function MessageQueue (url) {
- this.wsUrl = url || "ws://127.0.0.1:9999/";
- //this.wsUrl = url || "ws://193.136.93.204:9999/";
+ //this.wsUrl = url || "ws://127.0.0.1:9999/";
+ this.wsUrl = url || "ws://" + (env.browser ? location.host : env.queue);
this.queue = [];
this.ready = false;

0 comments on commit 103a599

Please sign in to comment.