Michelle Bu 11 years ago
parent
commit
602db8de7c
3 changed files with 14 additions and 6 deletions
  1. 7 3
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 7 3
      lib/negotiator.js

+ 7 - 3
dist/peer.js

@@ -2217,9 +2217,13 @@ Negotiator.handleSDP = function(type, connection, sdp) {
 }
 
 /** Handle a candidate. */
-Negotiator.handleCandidate = function(connection, candidate) {
-  var candidate = new RTCIceCandidate(candidate);
-  connection.pc.addIceCandidate(candidate);
+Negotiator.handleCandidate = function(connection, ice) {
+  var candidate = ice.candidate;
+  var sdpMLineIndex = ice.sdpMLineIndex;
+  connection.pc.addIceCandidate(new RTCIceCandidate({
+    sdpMLineIndex: sdpMLineIndex,
+    candidate: candidate
+  }));
   util.log('Added ICE candidate for:', connection.peer);
 }
 /**

File diff suppressed because it is too large
+ 0 - 0
dist/peer.min.js


+ 7 - 3
lib/negotiator.js

@@ -277,8 +277,12 @@ Negotiator.handleSDP = function(type, connection, sdp) {
 }
 
 /** Handle a candidate. */
-Negotiator.handleCandidate = function(connection, candidate) {
-  var candidate = new RTCIceCandidate(candidate);
-  connection.pc.addIceCandidate(candidate);
+Negotiator.handleCandidate = function(connection, ice) {
+  var candidate = ice.candidate;
+  var sdpMLineIndex = ice.sdpMLineIndex;
+  connection.pc.addIceCandidate(new RTCIceCandidate({
+    sdpMLineIndex: sdpMLineIndex,
+    candidate: candidate
+  }));
   util.log('Added ICE candidate for:', connection.peer);
 }

Some files were not shown because too many files changed in this diff