Bladeren bron

fix(JitsiConference) Check if participants exist before adding the tracks back.

When the call switches over to JVB after a remote p2p peer leaves, the remote tracks (of the peer that just left) are removed from the conference after the SSRCs are removed from SDP and since it necessitates a renegotiation, the task is pushed to the modification queue. Since the switch to jvb connection happens immediately, the remote jvb remote tracks are present after the switch and they get added to the conference again.
Add the check for the remote participant before adding the tracks. This fixes an issue where the remote tracks are present in redux even after the participant leaves.
master
Jaya Allamsetty 2 jaren geleden
bovenliggende
commit
4733465ec2
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4
    1
      JitsiConference.js

+ 4
- 1
JitsiConference.js Bestand weergeven

3102
  * @private
3102
  * @private
3103
  */
3103
  */
3104
 JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
3104
 JitsiConference.prototype._addRemoteTracks = function(logName, remoteTracks) {
3105
-    for (const track of remoteTracks) {
3105
+    // Add tracks for the participants that are still in the call.
3106
+    const existingTracks = remoteTracks.filter(t => this.participants.has(t.ownerEndpointId));
3107
+
3108
+    for (const track of existingTracks) {
3106
         logger.info(`Adding remote ${logName} track: ${track}`);
3109
         logger.info(`Adding remote ${logName} track: ${track}`);
3107
         this.onRemoteTrackAdded(track);
3110
         this.onRemoteTrackAdded(track);
3108
     }
3111
     }

Laden…
Annuleren
Opslaan