Browse Source

Doesn't fail when removeStream is called on FF.

master
George Politis 10 years ago
parent
commit
9d50084b98
2 changed files with 13 additions and 2 deletions
  1. 6
    1
      libs/app.bundle.js
  2. 7
    1
      modules/xmpp/TraceablePeerConnection.js

+ 6
- 1
libs/app.bundle.js View File

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 View File

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) {

Loading…
Cancel
Save