Michelle Bu před 12 roky
rodič
revize
4a497ef778
5 změnil soubory, kde provedl 4 přidání a 4 odebrání
  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':

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
dist/peer.min.js


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů