Michelle Bu 12 år sedan
förälder
incheckning
6c03c7b6f9
3 ändrade filer med 12 tillägg och 0 borttagningar
  1. 6 0
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 6 0
      lib/peer.js

+ 6 - 0
dist/peer.js

@@ -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',

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
dist/peer.min.js


+ 6 - 0
lib/peer.js

@@ -9,6 +9,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',

Vissa filer visades inte eftersom för många filer har ändrats