From 9ada0d1516d12fd31b08d4764c6ef1853e31192f Mon Sep 17 00:00:00 2001
From: Florent Castelli
be removed from the mapping of payload types in the SDP.
- The codecs sequence passed into - {{setCodecPreferences}} can only contain codecs that are - returned by + {{setCodecPreferences}} will reject attempts to set codecs + [=not matching | codec match=] codecs found in {{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(kind) or {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind), where kind is the kind of the {{RTCRtpTransceiver}} on which the method is called. - Additionally, the {{RTCRtpCodecCapability}} dictionary - members cannot be modified. If codecs does not - fulfill these requirements, the user agent MUST [= - exception/throw =] an {{InvalidModificationError}}.
Due to a recommendation in [[!SDP]], calls to @@ -11196,9 +11191,10 @@
If codec does [=not match any codec|codec match=] + in codecCapabilities, throw {{InvalidModificationError}}. +
+ The codec match algorithm given two {{RTCRtpCodec}} or compatible dictionaries first and second is as follows: +
+
+ If first.{{RTCRtpCodec/mimeType}} is different from
+ second.{{RTCRtpCodec/mimeType}}, return false
.
+
+ If first.{{RTCRtpCodec/clockRate}} is different from
+ second.{{RTCRtpCodec/clockRate}}, return false
.
+
+ If either (but not both) of first.{{RTCRtpCodec/channels}} and second.{{RTCRtpCodec/channels}}
+ are missing, or if they are both present and first.{{RTCRtpCodec/channels}} is different from
+ second.{{RTCRtpCodec/channels}}, return false
.
+
+ If either (but not both) of first.{{RTCRtpCodec/sdpFmtpLine}} and second.{{RTCRtpCodec/sdpFmtpLine}}
+ are missing, or if they are both present and first.{{RTCRtpCodec/sdpFmtpLine}} is different from
+ second.{{RTCRtpCodec/sdpFmtpLine}}, return false
.
+
+ Return true
.
+
If set, the offerer's codec preferences will decide the order of the codecs in the offer. If the answerer does not have any