Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit a4b949b

Browse files
authored
Keep flexfec in SDP even it is not exist in video codec parameters. (#393)
1 parent b128621 commit a4b949b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sdk/base/sdputils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ function setDefaultCodec(mLine, payload) {
514514

515515
// Following codecs will not be removed from SDP event they are not in the
516516
// user-specified codec list.
517-
const audioCodecWhiteList = ['CN', 'telephone-event'];
518-
const videoCodecWhiteList = ['red', 'ulpfec'];
517+
const audioCodecAllowList = ['CN', 'telephone-event'];
518+
const videoCodecAllowList = ['red', 'ulpfec', 'flexfec'];
519519

520520
// Returns a new m= line with the specified codec order.
521521
function setCodecOrder(mLine, payloads) {
@@ -561,8 +561,8 @@ export function reorderCodecs(sdp, type, codecs) {
561561
return sdp;
562562
}
563563

564-
codecs = type === 'audio' ? codecs.concat(audioCodecWhiteList) : codecs.concat(
565-
videoCodecWhiteList);
564+
codecs = type === 'audio' ? codecs.concat(audioCodecAllowList) : codecs.concat(
565+
videoCodecAllowList);
566566

567567
let sdpLines = sdp.split('\r\n');
568568

0 commit comments

Comments
 (0)