Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes issue with switching desktop stream.
paweldomas087c26d4942e
diff --git a/libs/strophe/strophe.jingle.sdp.js b/libs/strophe/strophe.jingle.sdp.jsindex 4a6b7ed349..19f73c62f0 100644--- a/libs/strophe/strophe.jingle.sdp.js+++ b/libs/strophe/strophe.jingle.sdp.js@@ -72,8 +72,8 @@ SDP.prototype.containsSSRC = function(ssrc) {};function SDPDiffer(mySDP, otherSDP) {- this.mySDP = new SDP(mySDP);- this.otherSDP = new SDP(otherSDP);+ this.mySDP = mySDP;+ this.otherSDP = otherSDP;}/**diff --git a/libs/strophe/strophe.jingle.session.js b/libs/strophe/strophe.jingle.session.jsindex 31eac54a74..dfb8952d45 100644--- a/libs/strophe/strophe.jingle.session.js+++ b/libs/strophe/strophe.jingle.session.js@@ -968,57 +968,58 @@ JingleSession.prototype.switchStreams = function (new_stream, oldStream, success*/JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {- if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')){+ if (!(this.peerconnection.signalingState == 'stable' &&+ this.peerconnection.iceConnectionState == 'connected')){console.log("Too early to send updates");return;}- // send source-add IQ.- var sdpDiffer = new SDPDiffer(old_sdp, new_sdp);- var add = $iq({to: self.peerjid, type: 'set'})+ // send source-remove IQ.+ sdpDiffer = new SDPDiffer(new_sdp, old_sdp);+ var remove = $iq({to: this.peerjid, type: 'set'}).c('jingle', {xmlns: 'urn:xmpp:jingle:1',- action: 'source-add',- initiator: self.initiator,- sid: self.sid+ action: 'source-remove',+ initiator: this.initiator,+ sid: this.sid});- var added = sdpDiffer.toJingle(add);- if (added) {- this.connection.sendIQ(add,+ var removed = sdpDiffer.toJingle(remove);+ if (removed) {+ this.connection.sendIQ(remove,function (res) {- console.info('got add result', res);+ console.info('got remove result', res);},function (err) {- console.error('got add error', err);+ console.error('got remove error', err);});} else {- console.log('addition not necessary');+ console.log('removal not necessary');}- // send source-remove IQ.- sdpDiffer = new SDPDiffer(new_sdp, old_sdp);- var remove = $iq({to: self.peerjid, type: 'set'})+ // send source-add IQ.+ var sdpDiffer = new SDPDiffer(old_sdp, new_sdp);+ var add = $iq({to: this.peerjid, type: 'set'}).c('jingle', {xmlns: 'urn:xmpp:jingle:1',- action: 'source-remove',- initiator: self.initiator,- sid: self.sid+ action: 'source-add',+ initiator: this.initiator,+ sid: this.sid});- var removed = sdpDiffer.toJingle(remove);- if (removed) {- this.connection.sendIQ(remove,+ var added = sdpDiffer.toJingle(add);+ if (added) {+ this.connection.sendIQ(add,function (res) {- console.info('got remove result', res);+ console.info('got add result', res);},function (err) {- console.error('got remove error', err);+ console.error('got add error', err);});} else {- console.log('removal not necessary');+ console.log('addition not necessary');}};