diff --git a/web/app/rtc/Connection.ts b/web/app/rtc/Connection.ts index f2784056..abce4fe2 100644 --- a/web/app/rtc/Connection.ts +++ b/web/app/rtc/Connection.ts @@ -116,15 +116,15 @@ class CommandHandler extends AbstractCommandHandler { type: "offer" }).then(() => this.handle["peer"].createAnswer()) .then(async answer => { + if(RTCConnection.kEnableSdpTrace) { + logTrace(LogCategory.WEBRTC, tr("Applying local description from remote %s:\n%s"), data.mode, answer.sdp); + } + answer.sdp = this.sdpProcessor.processOutgoingSdp(answer.sdp, "answer"); + await this.handle["peer"].setLocalDescription(answer); return answer; }) .then(answer => { - if(RTCConnection.kEnableSdpTrace) { - logTrace(LogCategory.WEBRTC, tr("Sending answer to remote %s:\n%s"), data.mode, answer.sdp); - } - answer.sdp = this.sdpProcessor.processOutgoingSdp(answer.sdp, "answer"); - answer.sdp = SdpCompressor.compressSdp(answer.sdp, kSdpCompressionMode); if(RTCConnection.kEnableSdpTrace) { logTrace(LogCategory.WEBRTC, tr("Patched answer to remote %s:\n%s"), data.mode, answer.sdp); diff --git a/web/app/rtc/SdpUtils.ts b/web/app/rtc/SdpUtils.ts index 40b40257..656d93dc 100644 --- a/web/app/rtc/SdpUtils.ts +++ b/web/app/rtc/SdpUtils.ts @@ -13,7 +13,7 @@ interface SdpCodec { /* These MUST be the payloads used by the remote as well */ const OPUS_VOICE_PAYLOAD_TYPE = 111; const OPUS_MUSIC_PAYLOAD_TYPE = 112; -const VP8_PAYLOAD_TYPE = 101; +const VP8_PAYLOAD_TYPE = 120; type SdpMedia = { type: string;