浏览代码

Doesn't fail when removeStream is called on FF.

master
George Politis 10 年前
父节点
当前提交
9d50084b98
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 6
    1
      libs/app.bundle.js
  2. 7
    1
      modules/xmpp/TraceablePeerConnection.js

+ 6
- 1
libs/app.bundle.js 查看文件

14483
             track.stop();
14483
             track.stop();
14484
         });
14484
         });
14485
     }
14485
     }
14486
-    this.peerconnection.removeStream(stream);
14486
+
14487
+    try {
14488
+        this.peerconnection.removeStream(stream);
14489
+    } catch (e) {
14490
+        console.error(e);
14491
+    }
14487
 };
14492
 };
14488
 
14493
 
14489
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
14494
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {

+ 7
- 1
modules/xmpp/TraceablePeerConnection.js 查看文件

161
             track.stop();
161
             track.stop();
162
         });
162
         });
163
     }
163
     }
164
-    this.peerconnection.removeStream(stream);
164
+
165
+    try {
166
+        // FF doesn't support this yet.
167
+        this.peerconnection.removeStream(stream);
168
+    } catch (e) {
169
+        console.error(e);
170
+    }
165
 };
171
 };
166
 
172
 
167
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
173
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {

正在加载...
取消
保存