Browse Source

fix(TPC): Do not configure encodings on Safari until reneg.

Avoid configuring the encodings on Chromium/Safari until simulcast is configured for the newly added track using SDP munging which happens during the renegotiation.
release-8443
Jaya Allamsetty 4 years ago
parent
commit
29269150f7
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      modules/RTC/TPCUtils.js

+ 5
- 3
modules/RTC/TPCUtils.js View File

@@ -383,9 +383,11 @@ export class TPCUtils {
383 383
                         transceiver.direction = TransceiverDirection.SENDRECV;
384 384
                     }
385 385
 
386
-                    // Avoid configuring the encodings on chromium since the encoding params are read-only
387
-                    // until the renegotation is done after the track is replaced on the sender.
388
-                    const promise = browser.isChromiumBased() ? Promise.resolve() : this.setEncodings(newTrack);
386
+                    // Avoid configuring the encodings on Chromium/Safari until simulcast is configured
387
+                    // for the newly added track using SDP munging which happens during the renegotiation.
388
+                    const promise = browser.usesSdpMungingForSimulcast()
389
+                        ? Promise.resolve()
390
+                        : this.setEncodings(newTrack);
389 391
 
390 392
                     return promise
391 393
                         .then(() => {

Loading…
Cancel
Save