From baebf8398a2d9522a6b06ad8bb5eeef395a5df5b Mon Sep 17 00:00:00 2001 From: paweldomas Date: Thu, 24 Sep 2015 14:54:11 +0200 Subject: [PATCH] Uses self=this in modifySourcesQueue callback of JingleSessionPC#addStream. --- modules/xmpp/JingleSessionPC.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index f08c04cec..5ea344696 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -1107,6 +1107,8 @@ JingleSessionPC.prototype.switchStreams = function (new_stream, oldStream, succe */ JingleSessionPC.prototype.addStream = function (stream, callback) { + var self = this; + // Remember SDP to figure out added/removed SSRCs var oldSdp = null; if(this.peerconnection) { @@ -1128,9 +1130,9 @@ JingleSessionPC.prototype.addStream = function (stream, callback) { callback(); - var newSdp = new SDP(this.peerconnection.localDescription.sdp); + var newSdp = new SDP(self.peerconnection.localDescription.sdp); console.log("SDPs", oldSdp, newSdp); - this.notifyMySSRCUpdate(oldSdp, newSdp); + self.notifyMySSRCUpdate(oldSdp, newSdp); }); }