diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index 30c833086..ecbbc248e 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -93,6 +93,8 @@ JingleSessionPC.prototype.doInitialize = function () { this.isreconnect = false; // Set to true if the connection was ever stable this.wasstable = false; + //Make sure we clear out stored ssrcs from previous peer connections + SSRCReplacement.init(); this.peerconnection = new TraceablePeerConnection( this.connection.jingle.ice_config, diff --git a/modules/xmpp/LocalSSRCReplacement.js b/modules/xmpp/LocalSSRCReplacement.js index 4bf109c1b..8db427d70 100644 --- a/modules/xmpp/LocalSSRCReplacement.js +++ b/modules/xmpp/LocalSSRCReplacement.js @@ -141,6 +141,15 @@ function generateRecvonlySSRC() { } var LocalSSRCReplacement = { + /** + * Initialize the module + */ + init: function() { + localVideoSSRC = null; + localRecvOnlySSRC = null; + localRecvOnlyCName = null; + }, + /** * Method must be called before 'session-initiate' or 'session-invite' is * sent. Scans the IQ for local video SSRC and stores it if detected.