瀏覽代碼

Fix leaked PC

Michelle Bu 11 年之前
父節點
當前提交
4cd3f4b2c9
共有 3 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      dist/peer.js
  2. 0 0
      dist/peer.min.js
  3. 1 1
      lib/negotiator.js

+ 1 - 1
dist/peer.js

@@ -2044,7 +2044,7 @@ Negotiator._startPeerConnection = function(connection) {
     optional = {optional: [{DtlsSrtpKeyAgreement: true}]};
     optional = {optional: [{DtlsSrtpKeyAgreement: true}]};
   }
   }
 
 
-  pc = new RTCPeerConnection(connection.provider.options.config, optional);
+  var pc = new RTCPeerConnection(connection.provider.options.config, optional);
   Negotiator.pcs[connection.type][connection.peer][id] = pc;
   Negotiator.pcs[connection.type][connection.peer][id] = pc;
 
 
   Negotiator._setupListeners(connection, pc, id);
   Negotiator._setupListeners(connection, pc, id);

文件差異過大導致無法顯示
+ 0 - 0
dist/peer.min.js


+ 1 - 1
lib/negotiator.js

@@ -104,7 +104,7 @@ Negotiator._startPeerConnection = function(connection) {
     optional = {optional: [{DtlsSrtpKeyAgreement: true}]};
     optional = {optional: [{DtlsSrtpKeyAgreement: true}]};
   }
   }
 
 
-  pc = new RTCPeerConnection(connection.provider.options.config, optional);
+  var pc = new RTCPeerConnection(connection.provider.options.config, optional);
   Negotiator.pcs[connection.type][connection.peer][id] = pc;
   Negotiator.pcs[connection.type][connection.peer][id] = pc;
 
 
   Negotiator._setupListeners(connection, pc, id);
   Negotiator._setupListeners(connection, pc, id);

部分文件因文件數量過多而無法顯示