Ver código fonte

chrome bug and remote add

Michelle Bu 12 anos atrás
pai
commit
b10bad768b
6 arquivos alterados com 6 adições e 5 exclusões
  1. 2 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
  6. 1 1
      lib/connection.js

+ 2 - 1
demo/static/peer.html

@@ -12,7 +12,8 @@
 <script>
 $(document).ready(function() {
   connections = {};
-  originator = new Peer({ ws: 'ws://localhost:9000', debug: true });
+  var REMOTE = 'ws://mixest.com:9382';
+  originator = new Peer({ ws: REMOTE, debug: true });
   originator.on('ready', function(id) {
     console.log(id);
   });

+ 1 - 1
demo/static/peer.js

@@ -964,7 +964,7 @@ function DataConnection(options, socket, cb) {
     this._maybeBrowserisms();
   } else if (sdp) {
     try {
-      sdp = new RTCSessionDescription(message.sdp);
+      sdp = new RTCSessionDescription(sdp);
     } catch(e) {
       util.log('Firefox');
     }

+ 1 - 1
demo/static/peer1.html

@@ -15,7 +15,7 @@ $(document).ready(function() {
   $('#connect').click(function() {
     var source = $('#source').val();
 
-    sink = new Peer({ ws: 'ws://localhost:9000', debug: true });
+    sink = new Peer({ ws: 'ws://mixest.com:9382', debug: true });
     sink.on('ready', function() {
       sink.connect(source, { username: 'michelle' }, function(err, connection) {
         console.log(connection);

+ 1 - 1
dist/peer.js

@@ -964,7 +964,7 @@ function DataConnection(options, socket, cb) {
     this._maybeBrowserisms();
   } else if (sdp) {
     try {
-      sdp = new RTCSessionDescription(message.sdp);
+      sdp = new RTCSessionDescription(sdp);
     } catch(e) {
       util.log('Firefox');
     }

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


+ 1 - 1
lib/connection.js

@@ -40,7 +40,7 @@ function DataConnection(options, socket, cb) {
     this._maybeBrowserisms();
   } else if (sdp) {
     try {
-      sdp = new RTCSessionDescription(message.sdp);
+      sdp = new RTCSessionDescription(sdp);
     } catch(e) {
       util.log('Firefox');
     }

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