Sfoglia il codice sorgente

fix(TPC) Do not force renegotiations for p2p.

Chrome doesn't render media when the SSRC is added back to the m-line after removing it because of source-remove->source-add from peer. Avoid renegotiations so that these source removes and adds are not sent to the peer after the track is replaced.
dev1
Jaya Allamsetty 3 anni fa
parent
commit
6ddc054c90
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      modules/RTC/TraceablePeerConnection.js

+ 2
- 2
modules/RTC/TraceablePeerConnection.js Vedi File

@@ -1980,8 +1980,8 @@ TraceablePeerConnection.prototype.replaceTrack = function(oldTrack, newTrack) {
1980 1980
                     ? Promise.resolve()
1981 1981
                     : this.tpcUtils.setEncodings(newTrack);
1982 1982
 
1983
-                // Renegotiate only in the case of P2P. We rely on 'negotiationeeded' to be fired for JVB.
1984
-                return configureEncodingsPromise.then(() => this.isP2P || negotiationNeeded);
1983
+                // Force renegotiation only when the source is added for the first time.
1984
+                return configureEncodingsPromise.then(() => negotiationNeeded);
1985 1985
             });
1986 1986
     }
1987 1987
 

Loading…
Annulla
Salva