From b06262d4a32a6de7674e91b6aff6b2ceabb89078 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty Date: Tue, 4 Feb 2025 15:59:23 -0500 Subject: [PATCH] feat(JitsiConference) Allow adding multiple tracks to the conference. This should be supported by the backend. This limitation was added here only because of track synchronization issues between JM and LJM. The support is added behind testing.allowMultipleTracks config.js setting Fixes https://github.com/jitsi/lib-jitsi-meet/issues/2205 --- JitsiConference.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JitsiConference.js b/JitsiConference.js index d4d79c93ad..7c718d3272 100644 --- a/JitsiConference.js +++ b/JitsiConference.js @@ -1124,8 +1124,8 @@ JitsiConference.prototype.addTrack = function(track) { // Currently, only adding multiple video streams of different video types is supported. // TODO - remove this limitation once issues with jitsi-meet trying to add multiple camera streams is fixed. - if (mediaType === MediaType.VIDEO - && !localTracks.find(t => t.getVideoType() === track.getVideoType())) { + if (this.options.config.testing?.allowMultipleTracks + || (mediaType === MediaType.VIDEO && !localTracks.find(t => t.getVideoType() === track.getVideoType()))) { const sourceName = getSourceNameForJitsiTrack( this.myUserId(), mediaType, @@ -1140,7 +1140,7 @@ JitsiConference.prototype.addTrack = function(track) { return Promise.all(addTrackPromises) .then(() => { this._setupNewTrack(track); - this._sendBridgeVideoTypeMessage(track); + mediaType === MediaType.VIDEO && this._sendBridgeVideoTypeMessage(track); this._updateRoomPresence(this.getActiveMediaSession()); if (this.isMutedByFocus || this.isVideoMutedByFocus) {