diff --git a/modules/RTC/TPCUtils.js b/modules/RTC/TPCUtils.js index e6922809c5..b6e07d1d41 100644 --- a/modules/RTC/TPCUtils.js +++ b/modules/RTC/TPCUtils.js @@ -470,10 +470,10 @@ export class TPCUtils { mLine.ssrcs = reorderedSsrcs; }); - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(parsedSdp) - }); + }; } /** @@ -626,10 +626,10 @@ export class TPCUtils { } }); - return new RTCSessionDescription({ + return { type: desc.type, sdp: transform.write(sdp) - }); + }; } /** @@ -703,10 +703,10 @@ export class TPCUtils { } } - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(parsedSdp) - }); + }; } /** @@ -776,10 +776,10 @@ export class TPCUtils { fmtpOpus.config = mungedConfig.trim(); } - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(parsedSdp) - }); + }; } /** @@ -842,10 +842,10 @@ export class TPCUtils { } } - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(parsedSdp) - }); + }; } /** @@ -892,9 +892,9 @@ export class TPCUtils { } }); - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(parsedSdp) - }); + }; } } diff --git a/modules/RTC/TraceablePeerConnection.js b/modules/RTC/TraceablePeerConnection.js index aed187393c..4f95e91c08 100644 --- a/modules/RTC/TraceablePeerConnection.js +++ b/modules/RTC/TraceablePeerConnection.js @@ -1233,10 +1233,10 @@ TraceablePeerConnection.prototype._injectSsrcGroupForUnifiedSimulcast = function } } - return new RTCSessionDescription({ + return { type: desc.type, sdp: transform.write(sdp) - }); + }; }; /* eslint-disable-next-line vars-on-top */ @@ -1797,10 +1797,10 @@ TraceablePeerConnection.prototype._adjustRemoteMediaDirection = function(remoteD }); }); - return new RTCSessionDescription({ + return { type: remoteDescription.type, sdp: transformer.toRawSDP() - }); + }; }; /** @@ -2458,10 +2458,10 @@ TraceablePeerConnection.prototype._createOfferOrAnswer = function(isOffer, const if (!this.options.disableRtx && browser.usesSdpMungingForSimulcast()) { // eslint-disable-next-line no-param-reassign - resultSdp = new RTCSessionDescription({ + resultSdp = { type: resultSdp.type, sdp: this.rtxModifier.modifyRtxSsrcs(resultSdp.sdp) - }); + }; this.trace( `create${logName}` diff --git a/modules/sdp/LocalSdpMunger.js b/modules/sdp/LocalSdpMunger.js index 3da390b7c5..2f688ce185 100644 --- a/modules/sdp/LocalSdpMunger.js +++ b/modules/sdp/LocalSdpMunger.js @@ -144,9 +144,9 @@ export default class LocalSdpMunger { this._transformMediaIdentifiers(videoMLine, ssrcMap); } - return new RTCSessionDescription({ + return { type: sessionDesc.type, sdp: transformer.toRawSDP() - }); + }; } } diff --git a/modules/sdp/SdpSimulcast.ts b/modules/sdp/SdpSimulcast.ts index 2811ac3c41..65204fc10e 100644 --- a/modules/sdp/SdpSimulcast.ts +++ b/modules/sdp/SdpSimulcast.ts @@ -227,9 +227,9 @@ export default class SdpSimulcast { } } - return new RTCSessionDescription({ + return { type: description.type, sdp: transform.write(session) - }); + }; } } diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index e38b285a12..2d836c34b7 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -655,10 +655,10 @@ export default class JingleSessionPC extends JingleSession { return Promise.reject(error); } - const remoteDescription = new RTCSessionDescription({ + const remoteDescription = { type: 'offer', sdp: remoteSdp - }); + }; const oldLocalSDP = this.peerconnection.localDescription.sdp; @@ -2062,10 +2062,10 @@ export default class JingleSessionPC extends JingleSession { const newRemoteSdp = this._processNewJingleOfferIq(jingleAnswer); const oldLocalSdp = new SDP(this.peerconnection.localDescription.sdp); - const remoteDescription = new RTCSessionDescription({ + const remoteDescription = { type: 'answer', sdp: newRemoteSdp.raw - }); + }; this.peerconnection.setRemoteDescription(remoteDescription) .then(() => {