Procházet zdrojové kódy

fix(TPC) Send presence before signaling for SS tracks.

This is needed for the track to be identified as a desktop track on the remote peer when the JitsiRemoteTrack is created.
Fixes https://github.com/jitsi/lib-jitsi-meet/issues/1649.
dev1
Jaya Allamsetty před 3 roky
rodič
revize
dd60d58ce4
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5
    1
      modules/RTC/TraceablePeerConnection.js

+ 5
- 1
modules/RTC/TraceablePeerConnection.js Zobrazit soubor

1944
     // Jicofo before the mute state is sent over presence. Therefore, trigger a renegotiation in this case. If we
1944
     // Jicofo before the mute state is sent over presence. Therefore, trigger a renegotiation in this case. If we
1945
     // rely on "negotiationneeded" fired by the browser to signal new ssrcs, the mute state in presence will be sent
1945
     // rely on "negotiationneeded" fired by the browser to signal new ssrcs, the mute state in presence will be sent
1946
     // before the source signaling which is undesirable.
1946
     // before the source signaling which is undesirable.
1947
-    const negotiationNeeded = Boolean(!oldTrack || !this.localTracks.has(oldTrack?.rtcId));
1947
+    // Send the presence before signaling for a new screenshare source. This is needed for multi-stream support since
1948
+    // videoType needs to be availble at remote track creation time so that a fake tile for screenshare can be added.
1949
+    // FIXME - This check needs to be removed when the client switches to the bridge based signaling for tracks.
1950
+    const isNewTrackScreenshare = !oldTrack && newTrack?.getVideoType() === VideoType.DESKTOP;
1951
+    const negotiationNeeded = !isNewTrackScreenshare && Boolean(!oldTrack || !this.localTracks.has(oldTrack?.rtcId));
1948
 
1952
 
1949
     if (this._usesUnifiedPlan) {
1953
     if (this._usesUnifiedPlan) {
1950
         logger.debug(`${this} TPC.replaceTrack using unified plan`);
1954
         logger.debug(`${this} TPC.replaceTrack using unified plan`);

Načítá se…
Zrušit
Uložit