Przeglądaj źródła

fix(ssrc-rewriting) Update mute state after source is re-mapped.

Also add all the orphan jvb tracks to the conference when the call switches over from p2p to jvb.
master
Jaya Allamsetty 2 lat temu
rodzic
commit
a23a8c7c9d

+ 8
- 8
JitsiConference.js Wyświetl plik

3091
 
3091
 
3092
 /**
3092
 /**
3093
  * Generates fake "remote track added" events for given Jingle session.
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
  * @param {Array<JitsiRemoteTrack>} remoteTracks the tracks that will be added
3095
  * @param {Array<JitsiRemoteTrack>} remoteTracks the tracks that will be added
3097
  * @private
3096
  * @private
3098
  */
3097
  */
3099
 JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
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
 

+ 4
- 0
modules/RTC/TraceablePeerConnection.js Wyświetl plik

626
     const track = this.getRemoteTracks().find(t => t.getSourceName() === sourceName);
626
     const track = this.getRemoteTracks().find(t => t.getSourceName() === sourceName);
627
 
627
 
628
     if (!track) {
628
     if (!track) {
629
+        if (FeatureFlags.isSsrcRewritingSupported()) {
630
+            logger.debug(`Remote track not found for source=${sourceName}, mute update failed!`);
631
+        }
632
+
629
         return;
633
         return;
630
     }
634
     }
631
 
635
 

+ 6
- 0
modules/xmpp/JingleSessionPC.js Wyświetl plik

1815
 
1815
 
1816
                         track._setVideoType(type);
1816
                         track._setVideoType(type);
1817
                     }
1817
                     }
1818
+
1819
+                    // Update the muted state on the track since the presence for this track could have been received
1820
+                    // before the updated source map is received on the bridge channel.
1821
+                    const peerMediaInfo = this._signalingLayer.getPeerMediaInfo(owner, mediaType, source);
1822
+
1823
+                    peerMediaInfo && this.peerconnection._sourceMutedChanged(source, peerMediaInfo.muted);
1818
                 } else {
1824
                 } else {
1819
                     logger.error(`Remote track attached to a remote SSRC=${ssrc} not found`);
1825
                     logger.error(`Remote track attached to a remote SSRC=${ssrc} not found`);
1820
                 }
1826
                 }

Ładowanie…
Anuluj
Zapisz