Skip to content

Commit

Permalink
Rename to "codec dictionary match" algorithm and remove index consist…
Browse files Browse the repository at this point in the history
…ency claim
  • Loading branch information
jan-ivar committed Apr 17, 2024
1 parent 52e76ec commit 61ea355
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -11299,7 +11299,7 @@ <h2>
</p>
<p>
{{setCodecPreferences}} will reject attempts to set <var>codecs</var>
[= codec match | not matching =] codecs found in
[= codec dictionary match | not matching =] codecs found in
{{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(<var>kind</var>),
where <var>kind</var> is the kind of the
{{RTCRtpTransceiver}} on which the method is called.
Expand Down Expand Up @@ -11329,28 +11329,16 @@ <h2>
</li>
<li>
<p>
Remove any duplicate values in <var>codecs</var>. 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
<var>codecs</var>. Start at the back of the list such
that the order of the codecs is maintained.
</p>
</li>
<li class="no-test-needed">
<p>
Let <var>kind</var> be the <var>transceiver</var>'s [=RTCRtpTransceiver/transceiver kind=].
</p>
</li>
<li data-tests="RTCRtpTransceiver-setCodecPreferences.html">
<p>
If the intersection between <var>codecs</var> and
{{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(<var>kind</var>).{{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
<var>transceiver</var>.{{RTCRtpTransceiver/direction}}.
</p>
</li>
<li class="no-test-needed">
<p>
Let <var>codecCapabilities</var> be
Expand All @@ -11363,12 +11351,21 @@ <h2>
</p>
<ol>
<li>
<p>If <var>codec</var> does [= codec match | not match any codec =]
<p>If <var>codec</var> does [= codec dictionary match | not match any codec =]
in <var>codecCapabilities</var>, throw {{InvalidModificationError}}.
</p>
</li>
</ol>
</li>
<li data-tests="RTCRtpTransceiver-setCodecPreferences.html">
<p>
If <var>codecs</var> 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
<var>transceiver</var>.{{RTCRtpTransceiver/direction}}.
</p>
</li>
<li data-tests="RTCRtpTransceiver-setCodecPreferences.html">
<p>
Set <var>transceiver</var>.{{RTCRtpTransceiver/[[PreferredCodecs]]}} to
Expand All @@ -11378,7 +11375,8 @@ <h2>
</ol>
</div>
<div id="setcodecparameters-algorithm">
<p> The <dfn class="export">codec match</dfn> algorithm given two {{RTCRtpCodec}}
<p> The <dfn class="export">codec dictionary match</dfn> algorithm
given two {{RTCRtpCodec}} dictionaries
<var>first</var> and <var>second</var> is as follows:
</p>
<ol class=algorithm>
Expand Down

0 comments on commit 61ea355

Please sign in to comment.