Michelle Bu 12 anos atrás
pai
commit
4a497ef778
5 arquivos alterados com 4 adições e 4 exclusões
  1. 1 1
      demo/static/peer.html
  2. 1 1
      demo/static/peer.js
  3. 1 1
      demo/static/peer1.html
  4. 1 1
      dist/peer.js
  5. 0 0
      dist/peer.min.js

+ 1 - 1
demo/static/peer.html

@@ -11,7 +11,7 @@
 <script type="text/javascript" src="/peer.js"></script>
 <script>
 $(document).ready(function() {
-  originator = new Peer('michelle', { key: 'x8w1becrbresif6r', host: 'localhost', port: '9000', debug: true });
+  originator = new Peer('michelle', { key: '3lcmbh31bezpk3xr', host: 'localhost', port: '9000', debug: true });
   originator.on('open', function(id) {
     console.log(id);
   });

+ 1 - 1
demo/static/peer.js

@@ -911,8 +911,8 @@ Peer.prototype._handleServerJSONMessage = function(message) {
       if (!this.id) {
         // If we're just now getting an ID then we may have a queue.
         this.id = message.id;
-        this.emit('id', this.id);
       }
+      this.emit('open', this.id);
       this._processQueue();
       break;
     case 'ERROR':

+ 1 - 1
demo/static/peer1.html

@@ -14,7 +14,7 @@ $(document).ready(function() {
   $('#connect').click(function() {
     var source = $('#source').val();
 
-    sink = new Peer({ key: 'x8w1becrbresif6r', host: 'localhost', port: '9000', debug: true });
+    sink = new Peer({ key: '3lcmbh31bezpk3xr', host: 'localhost', port: '9000', debug: true });
     connection = sink.connect(source, { username: 'michelle_spoof' })
     connection.on('data', function(data) {
       console.log(data);

+ 1 - 1
dist/peer.js

@@ -911,8 +911,8 @@ Peer.prototype._handleServerJSONMessage = function(message) {
       if (!this.id) {
         // If we're just now getting an ID then we may have a queue.
         this.id = message.id;
-        this.emit('id', this.id);
       }
+      this.emit('open', this.id);
       this._processQueue();
       break;
     case 'ERROR':

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/peer.min.js


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff