diff --git a/JitsiConferenceEventManager.js b/JitsiConferenceEventManager.js index 76f28f1a16..e55a3cf8bf 100644 --- a/JitsiConferenceEventManager.js +++ b/JitsiConferenceEventManager.js @@ -528,15 +528,11 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() { }); rtc.addListener(RTCEvents.VIDEO_SSRCS_REMAPPED, msg => { - for (const session of this.conference.getMediaSessions()) { - session.processSourceMap(msg, MediaType.VIDEO); - } + this.conference.jvbJingleSession.processSourceMap(msg, MediaType.VIDEO); }); rtc.addListener(RTCEvents.AUDIO_SSRCS_REMAPPED, msg => { - for (const session of this.conference.getMediaSessions()) { - session.processSourceMap(msg, MediaType.AUDIO); - } + this.conference.jvbJingleSession.processSourceMap(msg, MediaType.AUDIO); }); rtc.addListener(RTCEvents.ENDPOINT_MESSAGE_RECEIVED, diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index 53d073ff2c..58e1de6c99 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -1781,9 +1781,13 @@ export default class JingleSessionPC extends JingleSession { } } } else { - logger.debug(`Existing SSRC re-mapped ${ssrc}: new owner=${owner}, source-name=${source}`); const track = this.peerconnection.getTrackBySSRC(ssrc); + if (track.getParticipantId() === owner && track.getSourceName() === source) { + continue; // eslint-disable-line no-continue + } + logger.debug(`Existing SSRC re-mapped ${ssrc}: new owner=${owner}, source-name=${source}`); + this._signalingLayer.setSSRCOwner(ssrc, owner, source); // Update the muted state and the video type on the track since the presence for this track could have