Michelle Bu vor 12 Jahren
Ursprung
Commit
6c03c7b6f9
3 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  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',

Datei-Diff unterdrückt, da er zu groß ist
+ 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',

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.