Ver código fonte

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 anos atrás
pai
commit
4733465ec2
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4
    1
      JitsiConference.js

+ 4
- 1
JitsiConference.js Ver arquivo

@@ -3102,7 +3102,10 @@ JitsiConference.prototype._addRemoteP2PTracks = function() {
3102 3102
  * @private
3103 3103
  */
3104 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 3109
         logger.info(`Adding remote ${logName} track: ${track}`);
3107 3110
         this.onRemoteTrackAdded(track);
3108 3111
     }

Carregando…
Cancelar
Salvar