Browse Source

fix(multi-stream) Block addition of multiple video streams of the same videoType.

This fixes an issue where mute camera operation doesn't stop sending camera stream even though locally it appears to the user that they are muted. This happens when multiple camera streams are added to peerconnection because of how toggle of the video button is implemented. This limitation will be removed when the application is fixed.
dev1
Jaya Allamsetty 3 years ago
parent
commit
3fc032652d
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      JitsiConference.js

+ 5
- 1
JitsiConference.js View File

@@ -1127,7 +1127,11 @@ JitsiConference.prototype.addTrack = function(track) {
1127 1127
             return Promise.resolve(track);
1128 1128
         }
1129 1129
 
1130
-        if (FeatureFlags.isMultiStreamSupportEnabled() && mediaType === MediaType.VIDEO) {
1130
+        // Currently, only adding multiple video streams of different video types is supported.
1131
+        // TODO - remove this limitation once issues with jitsi-meet trying to add multiple camera streams is fixed.
1132
+        if (FeatureFlags.isMultiStreamSupportEnabled()
1133
+            && mediaType === MediaType.VIDEO
1134
+            && !localTracks.find(t => t.getVideoType() === track.getVideoType())) {
1131 1135
             const sourceName = getSourceNameForJitsiTrack(
1132 1136
                 this.myUserId(),
1133 1137
                 mediaType,

Loading…
Cancel
Save