|
@@ -3091,18 +3091,18 @@ JitsiConference.prototype._addRemoteP2PTracks = function() {
|
3091
|
3091
|
|
3092
|
3092
|
/**
|
3093
|
3093
|
* Generates fake "remote track added" events for given Jingle session.
|
3094
|
|
- * @param {string} logName the session's nickname which will appear in log
|
3095
|
|
- * messages.
|
|
3094
|
+ * @param {string} logName the session's nickname which will appear in log messages.
|
3096
|
3095
|
* @param {Array<JitsiRemoteTrack>} remoteTracks the tracks that will be added
|
3097
|
3096
|
* @private
|
3098
|
3097
|
*/
|
3099
|
3098
|
JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
|
3100
|
|
- // Add tracks for the participants that are still in the call.
|
3101
|
|
- const existingTracks = remoteTracks.filter(t => this.participants.has(t.ownerEndpointId));
|
3102
|
|
-
|
3103
|
|
- for (const track of existingTracks) {
|
3104
|
|
- logger.info(`Adding remote ${logName} track: ${track}`);
|
3105
|
|
- this.onRemoteTrackAdded(track);
|
|
3099
|
+ for (const track of remoteTracks) {
|
|
3100
|
+ // There will be orphan (with no owner) tracks when ssrc-rewriting is enabled and all of them need to be addded
|
|
3101
|
+ // back to the conference.
|
|
3102
|
+ if (FeatureFlags.isSsrcRewritingSupported() || this.participants.has(track.ownerEndpointId)) {
|
|
3103
|
+ logger.info(`Adding remote ${logName} track: ${track}`);
|
|
3104
|
+ this.onRemoteTrackAdded(track);
|
|
3105
|
+ }
|
3106
|
3106
|
}
|
3107
|
3107
|
};
|
3108
|
3108
|
|