From 00348fa6fd2c7c2a6a01010c3e04c9a7ca64764c Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Mon, 27 Apr 2015 11:09:25 +0200 Subject: [PATCH] Added support to control Opus DTX. --- static/js/mediastream/utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/static/js/mediastream/utils.js b/static/js/mediastream/utils.js index 9f41acda..5cc1b696 100644 --- a/static/js/mediastream/utils.js +++ b/static/js/mediastream/utils.js @@ -81,6 +81,14 @@ define([], function() { sdp = removeCodecParam(sdp, 'opus/48000', 'useinbandfec'); } + // Set Opus DTX, if opusdtx is true, unset it, if opusdtx is false, and + // do nothing if otherwise. + if (params.opusDtx === 'true') { + sdp = setCodecParam(sdp, 'opus/48000', 'usedtx', '1'); + } else if (params.opusDtx === 'false') { + sdp = removeCodecParam(sdp, 'opus/48000', 'usedtx'); + } + // Set Opus maxplaybackrate, if requested. if (params.opusMaxPbr) { sdp = setCodecParam(