diff --git a/webrtc.html b/webrtc.html index cc1ffeb64..03e1997b7 100644 --- a/webrtc.html +++ b/webrtc.html @@ -11299,7 +11299,7 @@
{{setCodecPreferences}} will reject attempts to set codecs - [= codec match | not matching =] codecs found in + [= codec dictionary match | not matching =] codecs found in {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind), where kind is the kind of the {{RTCRtpTransceiver}} on which the method is called. @@ -11329,11 +11329,9 @@
- Remove any duplicate values in codecs. Start - at the back of the list such that the priority of the - codecs is maintained; the index of the first occurrence - of a codec within the list is the same before and after - this step. + Remove any [= codec dictionary match | duplicate =] values in + codecs. Start at the back of the list such + that the order of the codecs is maintained.
- If the intersection between codecs and - {{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(kind).{{RTCRtpParameters/codecs}} - only contains RTX, RED, FEC codecs or Comfort Noise codecs or is an empty set, - throw {{InvalidModificationError}}. This ensures that we - always have something to offer, regardless of - transceiver.{{RTCRtpTransceiver/direction}}. -
-Let codecCapabilities be @@ -11363,12 +11351,21 @@
If codec does [= codec match | not match any codec =] +
If codec does [= codec dictionary match | not match =] any codec in codecCapabilities, throw {{InvalidModificationError}}.
+ If codecs only contains entries for RTX, RED, FEC + or Comfort Noise or is an empty set, + throw {{InvalidModificationError}}. This ensures that we + always have something to offer, regardless of + transceiver.{{RTCRtpTransceiver/direction}}. +
+Set transceiver.{{RTCRtpTransceiver/[[PreferredCodecs]]}} to @@ -11378,7 +11375,8 @@
The codec match algorithm given two {{RTCRtpCodec}} +
The codec dictionary match algorithm + given two {{RTCRtpCodec}} dictionaries first and second is as follows: