From e3da472e7aff4b5a23f2eacf2068093cb6d3a23e Mon Sep 17 00:00:00 2001 From: George Politis Date: Thu, 21 May 2015 10:32:00 +0200 Subject: [PATCH] Adds special handling of recvonly remote streams. --- modules/xmpp/JingleSession.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/xmpp/JingleSession.js b/modules/xmpp/JingleSession.js index 6f0f77364c..9d82757e04 100644 --- a/modules/xmpp/JingleSession.js +++ b/modules/xmpp/JingleSession.js @@ -94,8 +94,16 @@ JingleSession.prototype.initiate = function (peerjid, isInitiator) { self.sendIceCandidate(event.candidate); }; this.peerconnection.onaddstream = function (event) { - console.log("REMOTE STREAM ADDED: " + event.stream + " - " + event.stream.id); - self.remoteStreamAdded(event); + if (event.stream.id !== 'default') { + console.log("REMOTE STREAM ADDED: " + event.stream + " - " + event.stream.id); + self.remoteStreamAdded(event); + } else { + // This is a recvonly stream. Clients that implement Unified Plan, + // such as Firefox use recvonly "streams/channels/tracks" for + // receiving remote stream/tracks, as opposed to Plan B where there + // are only 3 channels: audio, video and data. + console.log("RECVONLY REMOTE STREAM IGNORED: " + event.stream + " - " + event.stream.id); + } }; this.peerconnection.onremovestream = function (event) { // Remove the stream from remoteStreams