Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssrc-rewriting): Check for track owner/sourceName before calling TRACK_OWNER_SET. #2515

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions JitsiConferenceEventManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion modules/xmpp/JingleSessionPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading