@@ -1144,6 +1144,12 @@ function Peer(id, options) {
if (!(this instanceof Peer)) return new Peer(id, options);
EventEmitter.call(this);
+ // Detect relative URL host.
+ if (options.host === '/') {
+ options.host = window.location.hostname;
+ console.log('wat')
+ }
+
options = util.extend({
debug: false,
host: '0.peerjs.com',
@@ -9,6 +9,12 @@ function Peer(id, options) {