Skip to content

Commit

Permalink
make setCodecPreferences only look at receive codecs
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Nov 28, 2023
1 parent 5340dad commit 91e0c78
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -11183,7 +11183,7 @@ <h2>
<dd>
<p>
The {{setCodecPreferences}} method overrides the default
codec preferences used by the <a>user agent</a>. When
receive codec preferences used by the <a>user agent</a>. When
generating a session description using either
{{RTCPeerConnection/createOffer}} or
{{RTCPeerConnection/createAnswer}}, the <a>user agent</a>
Expand Down Expand Up @@ -11221,8 +11221,6 @@ <h2>
<p>
{{setCodecPreferences}} will reject attempts to set <var>codecs</var>
[= codec match | not matching =] codecs found in
{{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(<var>kind</var>)
or
{{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 @@ -11278,20 +11276,16 @@ <h2>
<li data-tests="RTCRtpTransceiver-setCodecPreferences.html">
<p>
If the intersection between <var>codecs</var> and
{{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(<var>kind</var>).{{RTCRtpParameters/codecs}}
or the intersection between <var>codecs</var> and
{{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(<var>kind</var>).{{RTCRtpParameters/codecs}}
only contains RTX, RED or FEC codecs or is an empty set,
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 the union of
{{RTCRtpSender}}.{{RTCRtpSender/getCapabilities}}(<var>kind</var>).{{RTCRtpParameters/codecs}}
and
Let <var>codecCapabilities</var> be
{{RTCRtpReceiver}}.{{RTCRtpReceiver/getCapabilities}}(<var>kind</var>).{{RTCRtpParameters/codecs}}.
</p>
</li>
Expand Down Expand Up @@ -11357,7 +11351,7 @@ <h2>
</ol>
</div>
<p class="note">
If set, the offerer's codec preferences will decide the order
If set, the offerer's receive codec preferences will decide the order
of the codecs in the offer. If the answerer does not have any
codec preferences then the same order will be used in the
answer. However, if the answerer also has codec preferences,
Expand Down

0 comments on commit 91e0c78

Please sign in to comment.