Skip to content

Commit

Permalink
audio: allow disabling opus fec (webrtc#1323)
Browse files Browse the repository at this point in the history
allow disabling opus fec (which is currently enabled by default) for
testing purposes

Co-authored-by: Harald Alvestrand <[email protected]>
  • Loading branch information
fippo and alvestrand authored Jul 6, 2020
1 parent da6265e commit f850747
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/content/peerconnection/audio/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const offerOptions = {
// eslint-disable-next-line prefer-const
let useDtx = false;

// Disabling Opus FEC is an expert option without GUI.
// eslint-disable-next-line prefer-const
let useFec = true;

// Change the ptime. For opus supported values are [10, 20, 40, 60].
// Expert option without GUI.
// eslint-disable-next-line no-unused-vars
Expand Down Expand Up @@ -127,6 +131,9 @@ function gotDescription2(desc) {
if (useDtx) {
desc.sdp = desc.sdp.replace('useinbandfec=1', 'useinbandfec=1;usedtx=1');
}
if (!useFec) {
desc.sdp = desc.sdp.replace('useinbandfec=1', 'useinbandfec=0');
}
pc1.setRemoteDescription(desc).then(() => {}, onSetSessionDescriptionError);
}, onSetSessionDescriptionError);
}
Expand Down

0 comments on commit f850747

Please sign in to comment.