Browse Source

fix(ssrc-rewriting): Check for track owner/sourceName before calling TRACK_OWNER_SET.

When the bridge WS is re-established, jvb sends the full map of audio and video sources. Without the check, the library will end up firing TRACK_REMOVED and TRACK_ADDED for all the exiting tracks.
Also, process audio and video source maps only on JVB sessions.
release-8443
Jaya Allamsetty 1 year ago
parent
commit
799236df39
2 changed files with 7 additions and 7 deletions
  1. 2
    6
      JitsiConferenceEventManager.js
  2. 5
    1
      modules/xmpp/JingleSessionPC.js

+ 2
- 6
JitsiConferenceEventManager.js View File

@@ -528,15 +528,11 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() {
528 528
     });
529 529
 
530 530
     rtc.addListener(RTCEvents.VIDEO_SSRCS_REMAPPED, msg => {
531
-        for (const session of this.conference.getMediaSessions()) {
532
-            session.processSourceMap(msg, MediaType.VIDEO);
533
-        }
531
+        this.conference.jvbJingleSession.processSourceMap(msg, MediaType.VIDEO);
534 532
     });
535 533
 
536 534
     rtc.addListener(RTCEvents.AUDIO_SSRCS_REMAPPED, msg => {
537
-        for (const session of this.conference.getMediaSessions()) {
538
-            session.processSourceMap(msg, MediaType.AUDIO);
539
-        }
535
+        this.conference.jvbJingleSession.processSourceMap(msg, MediaType.AUDIO);
540 536
     });
541 537
 
542 538
     rtc.addListener(RTCEvents.ENDPOINT_MESSAGE_RECEIVED,

+ 5
- 1
modules/xmpp/JingleSessionPC.js View File

@@ -1781,9 +1781,13 @@ export default class JingleSessionPC extends JingleSession {
1781 1781
                     }
1782 1782
                 }
1783 1783
             } else {
1784
-                logger.debug(`Existing SSRC re-mapped ${ssrc}: new owner=${owner}, source-name=${source}`);
1785 1784
                 const track = this.peerconnection.getTrackBySSRC(ssrc);
1786 1785
 
1786
+                if (track.getParticipantId() === owner && track.getSourceName() === source) {
1787
+                    continue; // eslint-disable-line no-continue
1788
+                }
1789
+                logger.debug(`Existing SSRC re-mapped ${ssrc}: new owner=${owner}, source-name=${source}`);
1790
+
1787 1791
                 this._signalingLayer.setSSRCOwner(ssrc, owner, source);
1788 1792
 
1789 1793
                 // Update the muted state and the video type on the track since the presence for this track could have

Loading…
Cancel
Save