Pārlūkot izejas kodu

Doesn't fail when removeStream is called on FF.

j8
George Politis 10 gadus atpakaļ
vecāks
revīzija
9d50084b98
2 mainītis faili ar 13 papildinājumiem un 2 dzēšanām
  1. 6
    1
      libs/app.bundle.js
  2. 7
    1
      modules/xmpp/TraceablePeerConnection.js

+ 6
- 1
libs/app.bundle.js Parādīt failu

@@ -14483,7 +14483,12 @@ TraceablePeerConnection.prototype.removeStream = function (stream, stopStreams)
14483 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 14494
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {

+ 7
- 1
modules/xmpp/TraceablePeerConnection.js Parādīt failu

@@ -161,7 +161,13 @@ TraceablePeerConnection.prototype.removeStream = function (stream, stopStreams)
161 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 173
 TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {

Notiek ielāde…
Atcelt
Saglabāt