Michelle Bu 12 лет назад
Родитель
Сommit
6c03c7b6f9
3 измененных файлов с 12 добавлено и 0 удалено
  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',

Разница между файлами не показана из-за своего большого размера
+ 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',

Некоторые файлы не были показаны из-за большого количества измененных файлов