|
@@ -1060,15 +1060,29 @@ export default class JingleSessionPC extends JingleSession {
|
1060
|
1060
|
() => {
|
1061
|
1061
|
logger.info(`${this} setAnswer - succeeded`);
|
1062
|
1062
|
if (this.usesUnifiedPlan && browser.isChromiumBased()) {
|
1063
|
|
- // This hack is needed for Chrome to create a decoder for the ssrcs in the remote SDP when
|
1064
|
|
- // the local endpoint is the offerer and starts muted.
|
1065
|
|
- const remoteSdp = this.peerconnection.remoteDescription.sdp;
|
1066
|
|
- const remoteDescription = new RTCSessionDescription({
|
1067
|
|
- type: 'offer',
|
1068
|
|
- sdp: remoteSdp
|
1069
|
|
- });
|
|
1063
|
+ const workFunction = finishedCallback => {
|
|
1064
|
+ // This hack is needed for Chrome to create a decoder for the ssrcs in the remote SDP when
|
|
1065
|
+ // the local endpoint is the offerer and starts muted.
|
|
1066
|
+ const remoteSdp = this.peerconnection.remoteDescription.sdp;
|
|
1067
|
+ const remoteDescription = new RTCSessionDescription({
|
|
1068
|
+ type: 'offer',
|
|
1069
|
+ sdp: remoteSdp
|
|
1070
|
+ });
|
1070
|
1071
|
|
1071
|
|
- this._responderRenegotiate(remoteDescription);
|
|
1072
|
+ return this._responderRenegotiate(remoteDescription)
|
|
1073
|
+ .then(() => finishedCallback(), error => finishedCallback(error));
|
|
1074
|
+ };
|
|
1075
|
+
|
|
1076
|
+ logger.debug(`${this} Queued responderRenegotiate task`);
|
|
1077
|
+ this.modificationQueue.push(
|
|
1078
|
+ workFunction,
|
|
1079
|
+ error => {
|
|
1080
|
+ if (error) {
|
|
1081
|
+ logger.error(`${this} failed to renegotiate a decoder for muted endpoint ${error}`);
|
|
1082
|
+ } else {
|
|
1083
|
+ logger.debug(`${this} renegotiate a decoder for muted endpoint`);
|
|
1084
|
+ }
|
|
1085
|
+ });
|
1072
|
1086
|
}
|
1073
|
1087
|
},
|
1074
|
1088
|
error => {
|