Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [[SendCodecs]] and [[ReceiveCodecs]] internal slots. #2079

Merged
merged 4 commits into from
Jan 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 66 additions & 32 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1524,10 +1524,8 @@ <h4>Set the RTCSessionDescription</h4>
[[!SCTP-SDP]], Sections 10.3 and 10.4, <a>create an
RTCSctpTransport</a> with an initial state of
<code>"connecting"</code> and assign the result to the
<a>[[\SctpTransport]]</a> slot.</p>
</li>
<li>
<p>Otherwise, if an SCTP association is established,
<a>[[\SctpTransport]]</a> slot. Otherwise, if an SCTP
association is established,
but the "max-message-size" SDP attribute is updated,
<a>update the data max message size</a> of
<var>connection</var>'s <a>[[\SctpTransport]]</a>.</p>
Expand Down Expand Up @@ -1676,6 +1674,20 @@ <h4>Set the RTCSessionDescription</h4>
<code>"answer"</code> or <code>"pranswer"</code>,
then run the following steps:</p>
<ol>
<li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit/optional: Should <li> contain <p>? Fix indents?

Copy link
Contributor

@aboba aboba Jan 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

<p>Set
<var>transceiver</var>.<a>[[\Sender]]</a>.<a>[[\SendCodecs]]</a>
to the codecs that <var>description</var>
negotiates for sending, and which the user agent
is currently capable of sending.</p>
</li>
<li>
<p>Set
<var>transceiver</var>.<a>[[\Receiver]]</a>.<a>[[\ReceiveCodecs]]</a>
to the codecs that <var>description</var>
negotiates for receiving, and which the user
agent is currently prepared to receive.</p>
</li>
<li>
<p>If <var>direction</var> is
<code>"sendonly"</code> or <code>"inactive"</code>,
Expand Down Expand Up @@ -1734,7 +1746,7 @@ <h4>Set the RTCSessionDescription</h4>
description</a>.</p>
</li>
<li>
<p> If no suitable transceiver is found
<p>If no suitable transceiver is found
(<var>transceiver</var> is unset), run the following
steps:</p>
<ol>
Expand Down Expand Up @@ -1814,6 +1826,20 @@ <h4>Set the RTCSessionDescription</h4>
<code>"answer"</code> or <code>"pranswer"</code>, then run
the following steps:</p>
<ol>
<li>
<p>Set
<var>transceiver</var>.<a>[[\Sender]]</a>.<a>[[\SendCodecs]]</a>
to the codecs that <var>description</var>
negotiates for sending, and which the user agent
is currently capable of sending.</p>
</li>
<li>
<p>Set
<var>transceiver</var>.<a>[[\Receiver]]</a>.<a>[[\ReceiveCodecs]]</a>
to the codecs that <var>description</var>
negotiates for receiving, and which the user
agent is currently prepared to receive.</p>
</li>
<li>
<p>Set <var>transceiver</var>'s
<a>[[\CurrentDirection]]</a> and
Expand Down Expand Up @@ -1890,12 +1916,13 @@ <h4>Set the RTCSessionDescription</h4>
described by <span data-jsep=
"rollback">[[!JSEP]]</span>.</p>
</li>
<li>For the <code><a>RTCRtpTransceiver</a></code>s
<li>
<p>For the <code><a>RTCRtpTransceiver</a></code>s
remaining on <var>connection</var>, revert
any changes to the <a>[[\CurrentDirection]]</a> and
<a>[[\Receptive]]</a> internal slots made by the application
of the <code><a>RTCSessionDescription</a></code>
that is being rolled back.
that is being rolled back.</p>
</li>
<li>
<p>Restore the value of <var>connection</var>'s
Expand Down Expand Up @@ -1981,37 +2008,36 @@ <h4>Set the configuration</h4>
"set-pc-configuration">set a configuration</dfn>, run the
following steps:</p>
<ol>
<li>Let <var>configuration</var> be the
<li><p>Let <var>configuration</var> be the
<code><a>RTCConfiguration</a></code> dictionary to be
processed.</li>
<li>Let <var>connection</var> be the target
<code><a>RTCPeerConnection</a></code> object.</li>
<li>If <code><var>configuration</var>.peerIdentity</code> is
processed.</p></li>
<li><p>Let <var>connection</var> be the target
<code><a>RTCPeerConnection</a></code> object.</p></li>
<li><p>If <code><var>configuration</var>.peerIdentity</code> is
set and its value differs from the <a>target peer
identity</a>, <a>throw</a> an <code>InvalidModificationError</code>.
identity</a>, <a>throw</a> an <code>InvalidModificationError</code>.</p>
</li>
<li>If <code><var>configuration</var>.certificates</code> is
<li><p>If <code><var>configuration</var>.certificates</code> is
set and the set of certificates differs from the ones used
when <var>connection</var> was constructed, <a>throw</a> an
<code>InvalidModificationError</code>.</li>
<li>If the value of <code><var>configuration</var>.<a data-link-for=
<code>InvalidModificationError</code>.</p></li>
<li><p>If the value of <code><var>configuration</var>.<a data-link-for=
"RTCConfiguration">bundlePolicy</a></code> is set and its value
differs from the <var>connection</var>'s bundle policy, <a>throw</a>
an <code>InvalidModificationError</code>.</li>
<li>If the value of <code><var>configuration</var>.<a data-link-for=
an <code>InvalidModificationError</code>.</p></li>
<li><p>If the value of <code><var>configuration</var>.<a data-link-for=
"RTCConfiguration">rtcpMuxPolicy</a></code> is set and its value
differs from the
<var>connection</var>'s rtcpMux policy, <a>throw</a> an
differs from the <var>connection</var>'s rtcpMux policy, <a>throw</a> an
<code>InvalidModificationError</code>. If the value is
<code>"negotiate"</code> and the user agent does not implement
non-muxed RTCP, <a>throw</a> a <code>NotSupportedError</code>.</li>
<li>If the value of <code><var>configuration</var>.<a data-link-for=
non-muxed RTCP, <a>throw</a> a <code>NotSupportedError</code>.</p></li>
<li><p>If the value of <code><var>configuration</var>.<a data-link-for=
"RTCConfiguration">iceCandidatePoolSize</a></code> is set and its
value differs from the <var>connection</var>'s previously set
<code>iceCandidatePoolSize</code>, and <code><a data-link-for=
"RTCPeerConnection">setLocalDescription</a></code> has
already been called, <a>throw</a> an
<code>InvalidModificationError</code>.</li>
<code>InvalidModificationError</code>.</p></li>
<li>
<p>Set the <a>ICE Agent</a>'s <dfn id=
"ice-transports-setting">ICE transports setting</dfn> to
Expand Down Expand Up @@ -5704,6 +5730,12 @@ <h3><dfn>RTCRtpSender</dfn> Interface</h3>
single <code><a>RTCRtpEncodingParameters</a></code> with
<code>active</code> set to <code>true</code>.</p>
</li>
<li>
<p>Let <var>sender</var> have a <dfn>[[\SendCodecs]]</dfn>
internal slot, representing a list of
<code><a>RTCRtpCodecParameters</a></code> dictionaries, and
initialized to an empty list.</p>
</li>
<li>
<p>Let <var>sender</var> have a <dfn>[[\LastReturnedParameters]]</dfn>
internal slot, which will be used to match
Expand Down Expand Up @@ -5960,12 +5992,8 @@ <h2>Methods</h2>
have been negotiated for sending.
</li>
<li>
The <code><a data-link-for="RTCRtpParameters">codecs</a></code>
sequence is populated based on the codecs that have been
negotiated for sending, and which the user agent is currently
capable of sending. Prior to the completion of negotiation,
the <code><a data-link-for="RTCRtpParameters">codecs</a></code>
sequence is empty.
<code><a data-link-for="RTCRtpParameters">codecs</a></code>
is set to the value of the <a>[[\SendCodecs]]</a> internal slot.
</li>
<li>
<code><a data-link-for="RTCRtpParameters">rtcp</a>.cname</code>
Expand Down Expand Up @@ -6824,6 +6852,12 @@ <h3><dfn>RTCRtpReceiver</dfn> Interface</h3>
the <code><a>MediaStreamTrack</a></code> object of this receiver is
associated with, and initialized to an empty list.</p>
</li>
<li>
<p>Let <var>receiver</var> have a <dfn>[[\ReceiveCodecs]]</dfn>
internal slot, representing a list of
<code><a>RTCRtpCodecParameters</a></code> dictionaries, and
initialized to an empty list.</p>
</li>
<li>
<p>Return <var>receiver</var>.</p>
</li>
Expand Down Expand Up @@ -6931,9 +6965,9 @@ <h2>Methods</h2>
receiver is currently prepared to receive.
</li>
<li>
<p>The <code><a data-link-for="RTCRtpParameters">codecs</a></code>
sequence is populated based on the codecs that the receiver
is currently prepared to receive.</p>
<p><code><a data-link-for="RTCRtpParameters">codecs</a></code>
is set to the value of the <a>[[\ReceiveCodecs]]</a> internal
slot.</p>
<div class="note">Both the local and remote description may
affect this list of codecs. For example, if three codecs are
offered, the receiver will be prepared to receive each of
Expand Down