From 66f7ddd6b2ae02d3b8fcd2f74a75f69c159c05df Mon Sep 17 00:00:00 2001 From: George Politis Date: Thu, 4 Dec 2014 17:49:02 +0100 Subject: [PATCH] Taking into account the fact that FF nightlies include the local SSRCs in the local SDP. --- libs/strophe/strophe.jingle.adapter.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libs/strophe/strophe.jingle.adapter.js b/libs/strophe/strophe.jingle.adapter.js index 7de262361..1ef034937 100644 --- a/libs/strophe/strophe.jingle.adapter.js +++ b/libs/strophe/strophe.jingle.adapter.js @@ -529,7 +529,10 @@ function setupRTC() { }, pc_constraints: {}, getLocalSSRC: function (session, callback) { - session.peerconnection.getStats(function (s) { + // NOTE(gp) latest FF nightlies seem to provide the local + // SSRCs in their SDP so there's no longer necessary to + // take it from the peer connection stats. + /*session.peerconnection.getStats(function (s) { var ssrcs = {}; s.forEach(function (item) { if (item.type == "outboundrtp" && !item.isRemote) @@ -545,7 +548,8 @@ function setupRTC() { }, function () { callback(null); - }); + });*/ + callback(null); }, getStreamID: function (stream) { var tracks = stream.getVideoTracks(); @@ -584,7 +588,9 @@ function setupRTC() { callback(null); }, getStreamID: function (stream) { - return stream.id; + // streams from FF endpoints have the characters '{' and '}' + // that make jQuery choke. + return stream.id.replace(/[\{,\}]/g,""); }, getVideoSrc: function (element) { return element.getAttribute("src");