Adds special handling of recvonly remote streams.

This commit is contained in:
George Politis 2015-05-21 10:32:00 +02:00
parent 43f60ca336
commit e3da472e7a
1 changed files with 10 additions and 2 deletions

View File

@ -94,8 +94,16 @@ JingleSession.prototype.initiate = function (peerjid, isInitiator) {
self.sendIceCandidate(event.candidate); self.sendIceCandidate(event.candidate);
}; };
this.peerconnection.onaddstream = function (event) { this.peerconnection.onaddstream = function (event) {
if (event.stream.id !== 'default') {
console.log("REMOTE STREAM ADDED: " + event.stream + " - " + event.stream.id); console.log("REMOTE STREAM ADDED: " + event.stream + " - " + event.stream.id);
self.remoteStreamAdded(event); 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) { this.peerconnection.onremovestream = function (event) {
// Remove the stream from remoteStreams // Remove the stream from remoteStreams