|
@@ -2374,15 +2374,6 @@ TraceablePeerConnection.prototype.setRemoteDescription = function(description) {
|
2374
|
2374
|
// Munge stereo flag and opusMaxAverageBitrate based on config.js
|
2375
|
2375
|
remoteDescription = this._mungeOpus(remoteDescription);
|
2376
|
2376
|
|
2377
|
|
- if (this.isSimulcastOn()) {
|
2378
|
|
- // Add x-google-conference flag for plan-b mode.
|
2379
|
|
- const addGoogConfFlag = (browser.isChromiumBased() || browser.isReactNative()) && !this._usesUnifiedPlan;
|
2380
|
|
-
|
2381
|
|
- // Implode the simulcast ssrcs so that the remote sdp has only the first ssrc in the SIM group.
|
2382
|
|
- remoteDescription = this.simulcast.mungeRemoteDescription(remoteDescription, addGoogConfFlag);
|
2383
|
|
- this.trace('setRemoteDescription::postTransform (simulcast)', dumpSDP(remoteDescription));
|
2384
|
|
- }
|
2385
|
|
-
|
2386
|
2377
|
if (this._usesUnifiedPlan) {
|
2387
|
2378
|
// Translate the SDP to Unified plan format first for the jvb case, p2p case will only have 2 m-lines.
|
2388
|
2379
|
if (!this.isP2P) {
|
|
@@ -2392,17 +2383,29 @@ TraceablePeerConnection.prototype.setRemoteDescription = function(description) {
|
2392
|
2383
|
this.trace('setRemoteDescription::postTransform (Unified)', dumpSDP(remoteDescription));
|
2393
|
2384
|
}
|
2394
|
2385
|
if (this.isSimulcastOn()) {
|
|
2386
|
+ // Implode the simulcast ssrcs so that the remote sdp has only the first ssrc in the SIM group.
|
|
2387
|
+ remoteDescription = this.simulcast.mungeRemoteDescription(remoteDescription);
|
|
2388
|
+ this.trace('setRemoteDescription::postTransform (simulcast)', dumpSDP(remoteDescription));
|
|
2389
|
+
|
2395
|
2390
|
remoteDescription = this.tpcUtils.insertUnifiedPlanSimulcastReceive(remoteDescription);
|
2396
|
2391
|
this.trace('setRemoteDescription::postTransform (sim receive)', dumpSDP(remoteDescription));
|
2397
|
2392
|
}
|
2398
|
2393
|
remoteDescription = this.tpcUtils.ensureCorrectOrderOfSsrcs(remoteDescription);
|
2399
|
2394
|
this.trace('setRemoteDescription::postTransform (correct ssrc order)', dumpSDP(remoteDescription));
|
2400
|
2395
|
} else {
|
|
2396
|
+ if (this.isSimulcastOn()) {
|
|
2397
|
+ // Implode the simulcast ssrcs so that the remote sdp has only the first ssrc in the SIM group.
|
|
2398
|
+ remoteDescription = this.simulcast.mungeRemoteDescription(
|
|
2399
|
+ remoteDescription,
|
|
2400
|
+ true /* add x-google-conference flag */);
|
|
2401
|
+ this.trace('setRemoteDescription::postTransform (simulcast)', dumpSDP(remoteDescription));
|
|
2402
|
+ }
|
2401
|
2403
|
remoteDescription = normalizePlanB(remoteDescription);
|
2402
|
2404
|
}
|
2403
|
2405
|
|
2404
|
2406
|
// Munge the order of the codecs based on the preferences set through config.js.
|
2405
|
2407
|
remoteDescription = this._mungeCodecOrder(remoteDescription);
|
|
2408
|
+ this.trace('setRemoteDescription::postTransform (munge codec order)', dumpSDP(remoteDescription));
|
2406
|
2409
|
|
2407
|
2410
|
return new Promise((resolve, reject) => {
|
2408
|
2411
|
this.peerconnection.setRemoteDescription(remoteDescription)
|