From 9d50084b985fb41d148b23f534f7e3dc7cdc8ad7 Mon Sep 17 00:00:00 2001 From: George Politis Date: Thu, 12 Mar 2015 17:00:40 +0100 Subject: [PATCH] Doesn't fail when removeStream is called on FF. --- libs/app.bundle.js | 7 ++++++- modules/xmpp/TraceablePeerConnection.js | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libs/app.bundle.js b/libs/app.bundle.js index 0bf09a8c9..cf33e4304 100644 --- a/libs/app.bundle.js +++ b/libs/app.bundle.js @@ -14483,7 +14483,12 @@ TraceablePeerConnection.prototype.removeStream = function (stream, stopStreams) track.stop(); }); } - this.peerconnection.removeStream(stream); + + try { + this.peerconnection.removeStream(stream); + } catch (e) { + console.error(e); + } }; TraceablePeerConnection.prototype.createDataChannel = function (label, opts) { diff --git a/modules/xmpp/TraceablePeerConnection.js b/modules/xmpp/TraceablePeerConnection.js index c0cd4a3c8..47a33113e 100644 --- a/modules/xmpp/TraceablePeerConnection.js +++ b/modules/xmpp/TraceablePeerConnection.js @@ -161,7 +161,13 @@ TraceablePeerConnection.prototype.removeStream = function (stream, stopStreams) track.stop(); }); } - this.peerconnection.removeStream(stream); + + try { + // FF doesn't support this yet. + this.peerconnection.removeStream(stream); + } catch (e) { + console.error(e); + } }; TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {