Skip to content

Commit

Permalink
Merge pull request #2614 from jan-ivar/sessiondescription
Browse files Browse the repository at this point in the history
Disambiguate all uses of RTCSessionDescription.
  • Loading branch information
jan-ivar committed Dec 15, 2020
2 parents 9915912 + a3ade6c commit a07a324
Showing 1 changed file with 68 additions and 60 deletions.
128 changes: 68 additions & 60 deletions webrtc.html
Expand Up @@ -1757,28 +1757,30 @@ <h4>
</section>
<section>
<h4>
Set the RTCSessionDescription
Set the session description
</h4>
<p>
To <dfn id="set-local-description" data-lt=
"set local RTCSessionDescription|setting the local RTCSessionDescription">
set a local RTCSessionDescription</dfn> <var>description</var> on
an {{RTCPeerConnection}} object <var>connection</var>, run the [=
set an RTCSessionDescription =] algorithm with <var>remote</var>
set to <code>false</code>.
"set local session description|setting the local session description">
set a local session description</dfn> <var>description</var> on
an {{RTCPeerConnection}} object <var>connection</var>, [=
set a session description | set the session description =]
<var>description</var> on <var>connection</var> with the additional
value <code>false</code>.
</p>
<p>
To <dfn id="set-remote-description" data-lt=
"set remote RTCSessionDescription|setting the remote RTCSessionDescription">
set a remote RTCSessionDescription</dfn> <var>description</var>
on an {{RTCPeerConnection}} object <var>connection</var>, run the
[= set an RTCSessionDescription =] algorithm with
<var>remote</var> set to <code>true</code>.
"set remote session description|setting the remote session description">
set a remote session description</dfn> <var>description</var>
on an {{RTCPeerConnection}} object <var>connection</var>, [=
set a session description | set the session description =]
<var>description</var> on <var>connection</var> with the additional
value <code>true</code>.
</p>
<p>
To <dfn id="set-description" data-lt=
"set the RTCSessionDescription|setting an RTCSessionDescription">set
an RTCSessionDescription</dfn> <var>description</var> on an
"set the session description|setting a session description">set
a session description</dfn> <var>description</var> on an
{{RTCPeerConnection}} object <var>connection</var>, given a
<var>remote</var> boolean, run the following steps:
</p>
Expand All @@ -1791,7 +1793,7 @@ <h4>
<li data-tests=
"RTCPeerConnection-setLocalDescription-rollback.html,RTCPeerConnection-setRemoteDescription-rollback.html">
<p>
If <var>description</var>.{{RTCSessionDescription/type}} is
If <var>description</var>.{{RTCSessionDescriptionInit/type}} is
{{RTCSdpType/"rollback"}} and <var>connection</var>'s [=
signaling state =] is either {{RTCSignalingState/"stable"}},
{{RTCSignalingState/"have-local-pranswer"}}, or
Expand Down Expand Up @@ -1859,7 +1861,7 @@ <h4>
"RTCPeerConnection-setLocalDescription-answer.html,RTCPeerConnection-setLocalDescription-pranswer.html,RTCPeerConnection-setRemoteDescription-answer.html,RTCPeerConnection-setRemoteDescription-offer.html,RTCPeerConnection-setRemoteDescription-pranswer.html">
<p>
If
<var>description</var>.{{RTCSessionDescription/type}}
<var>description</var>.{{RTCSessionDescriptionInit/type}}
is invalid for the current [= signaling state =] of
<var>connection</var> as described in
<span data-jsep="processing-a-local-desc processing-a-remote-desc">
Expand Down Expand Up @@ -2696,6 +2698,15 @@ <h4>
{{RTCSdpType/"rollback"}}) run the following steps:
</p>
<ol>
<li>
<p>
Let <var>pendingDescription</var> be either
<var>connection</var>.<a>[[\PendingLocalDescription]]</a>
or
<var>connection</var>.<a>[[\PendingRemoteDescription]]</a>,
whichever one is not <code>null</code>.
</p>
</li>
<li>
<p>
For each <var>transceiver</var> in the
Expand All @@ -2705,11 +2716,10 @@ <h4>
<ol>
<li>
<p>
If the <var>transceiver</var> was not [=
If <var>transceiver</var> was not [=
associated =] with a [= media description =]
prior to applying the
{{RTCSessionDescription}} that is being
rolled back, disassociate it and set both
prior to <var>pendingDescription</var> being set,
disassociate it and set both
<var>transceiver</var>.<a>[[\JsepMid]]</a>
and <var>transceiver</var>.<a>[[\Mid]]</a> to
<code>null</code>.
Expand Down Expand Up @@ -2772,10 +2782,9 @@ <h4>
<li data-tests=
"RTCPeerConnection-setDescription-transceiver.html">
<p>
If the <var>transceiver</var> was created by
applying the {{RTCSessionDescription}} that
is being rolled back, and a track has never
been attached to it via
If <var>transceiver</var> was created when
<var>pendingDescription</var> was set, and a
track has never been attached to it via
{{RTCPeerConnection/addTrack()}}, then [=
stop the RTCRtpTransceiver =]
<var>transceiver</var>, and remove it from
Expand Down Expand Up @@ -3278,10 +3287,10 @@ <h2>
<a>[[\CurrentLocalDescription]]</a>.{{RTCSessionDescription/sdp}}
and
<a>[[\PendingLocalDescription]]</a>.{{RTCSessionDescription/sdp}}
need not be string-wise identical to the SDP value passed
to the corresponding {{setLocalDescription}} call (i.e. SDP
may be parsed and reformatted, and ICE candidates may be
added).
need not be string-wise identical to the
{{RTCSessionDescriptionInit/sdp}} value passed to the
corresponding {{setLocalDescription}} call (i.e. SDP may be
parsed and reformatted, and ICE candidates may be added).
</p>
</dd>
<dt>
Expand Down Expand Up @@ -3344,10 +3353,10 @@ <h2>
<a>[[\CurrentRemoteDescription]]</a>.{{RTCSessionDescription/sdp}}
and
<a>[[\PendingRemoteDescription]]</a>.{{RTCSessionDescription/sdp}}
need not be string-wise identical to the SDP value passed
to the corresponding {{setRemoteDescription}} call (i.e.
SDP may be parsed and reformatted, and ICE candidates may
be added).
need not be string-wise identical to the
{{RTCSessionDescriptionInit/sdp}} value passed to the
corresponding {{setRemoteDescription}} call (i.e. SDP may be
parsed and reformatted, and ICE candidates may be added).
</p>
</dd>
<dt data-tests=
Expand Down Expand Up @@ -3895,7 +3904,7 @@ <h2>
An answer can be marked as provisional, as described in
<span data-jsep=
"use-of-provisional-answer">[[!JSEP]]</span>, by setting
the {{RTCSessionDescription/type}} to
the {{RTCSessionDescriptionInit/type}} to
{{RTCSdpType/"pranswer"}}.
</p>
<p>
Expand Down Expand Up @@ -4167,7 +4176,7 @@ <h2>
<li class="no-test-needed">
<p>
Let <var>sdp</var> be
<var>description</var>.{{RTCSessionDescription/sdp}}.
<var>description</var>.{{RTCSessionDescriptionInit/sdp}}.
</p>
</li>
<li>
Expand All @@ -4180,7 +4189,7 @@ <h2>
"RTCPeerConnection-setLocalDescription-offer.html,RTCPeerConnection-setLocalDescription-answer.html,RTCPeerConnection-setLocalDescription-parameterless.https.html">
<p>
Let <var>type</var> be
<var>description</var>.{{RTCSessionDescription/type}}
<var>description</var>.{{RTCSessionDescriptionInit/type}}
if present, or {{RTCSdpType/"offer"}} if not
present and <var>connection</var>'s [= signaling
state =] is either {{RTCSignalingState/"stable"}},
Expand Down Expand Up @@ -4238,8 +4247,8 @@ <h2>
<var>connection</var>, and return the result of
[= promise/reacting =] to <var>p</var> with a
fulfillment step that [= set a local
RTCSessionDescription | sets the local
RTCSessionDescription =] indicated by its first
session description | sets the local
session description =] indicated by its first
argument.
</p>
</li>
Expand Down Expand Up @@ -4282,9 +4291,9 @@ <h2>
<li>
<p>
Return the result of [= setting the local
RTCSessionDescription =] indicated by
session description =] indicated by
<code class="param">{<var>type</var>,
<var>answer</var>.{{RTCSessionDescription/sdp}}}</code>.
<var>answer</var>.{{RTCSessionDescriptionInit/sdp}}}</code>.
</p>
</li>
</ol>
Expand All @@ -4295,7 +4304,7 @@ <h2>
"RTCPeerConnection-setLocalDescription-offer.html,RTCPeerConnection-setLocalDescription-answer.html">
<p>
Return the result of [= setting the local
RTCSessionDescription =] indicated by <code class=
session description =] indicated by <code class=
"param">{<var>type</var>, <var>sdp</var>}</code>.
</p>
</li>
Expand Down Expand Up @@ -4362,7 +4371,7 @@ <h2>
<li>
<p>
Let <var>p</var> be the result of [= setting
the local RTCSessionDescription =] indicated by
the local session description =] indicated by
<code class="param">{type:
{{RTCSdpType/"rollback"}}}</code>.
</p>
Expand All @@ -4371,8 +4380,8 @@ <h2>
<p>
Return the result of [= promise/reacting =] to
<var>p</var> with a fulfillment step that [=
set a remote RTCSessionDescription | sets the
remote RTCSessionDescription =]
set a remote session description | sets the
remote session description =]
<var>description</var>, and abort these steps.
</p>
</li>
Expand All @@ -4382,7 +4391,7 @@ <h2>
"RTCPeerConnection-setRemoteDescription-offer.html,RTCPeerConnection-setRemoteDescription-answer.html">
<p>
Return the result of [= setting the remote
RTCSessionDescription =] <var>description</var>.
session description =] <var>description</var>.
</p>
</li>
</ol>
Expand Down Expand Up @@ -5595,7 +5604,7 @@ <h2>
"idlAttrType">{{RTCSdpType}}</span>, readonly
</dt>
<dd>
The type of this RTCSessionDescription.
The type of this session description.
</dd>
<dt data-tests=
"RTCPeerConnection-setLocalDescription-answer.html,RTCPeerConnection-setLocalDescription-offer.html,RTCPeerConnection-setLocalDescription-pranswer.html">
Expand Down Expand Up @@ -5640,7 +5649,7 @@ <h2>
"idlMemberType">{{RTCSdpType}}</span>, required
</dt>
<dd>
The type of this description.
The type of this session description.
</dd>
<dt data-tests=
"RTCPeerConnection-setRemoteDescription-answer.html,RTCPeerConnection-setRemoteDescription-offer.html,RTCPeerConnection-setRemoteDescription-pranswer.html">
Expand All @@ -5650,7 +5659,7 @@ <h2>
<dd data-tests=
"RTCPeerConnection-setLocalDescription-rollback.html">
The string representation of the SDP [[!SDP]]; if
{{RTCSessionDescription/type}} is {{RTCSdpType/"rollback"}},
{{RTCSessionDescriptionInit/type}} is {{RTCSdpType/"rollback"}},
this member is unused.
</dd>
</dl>
Expand Down Expand Up @@ -5685,8 +5694,8 @@ <h2>
<dd data-tests=
"RTCPeerConnection-setLocalDescription-rollback.html">
The string representation of the SDP [[!SDP]]; if
{{RTCSessionDescription/type}} is {{RTCSdpType/"rollback"}},
this member is unused.
{{RTCLocalSessionDescriptionInit/type}} is
{{RTCSdpType/"rollback"}}, this member is unused.
</dd>
</dl>
</section>
Expand Down Expand Up @@ -5730,9 +5739,9 @@ <h4>
Clearing Negotiation-Needed
</h4>
<p>
The negotiation-needed flag is cleared when an
{{RTCSessionDescription}} of type {{RTCSdpType/"answer"}} [= set an
RTCSessionDescription | is applied =], and the supplied description
The negotiation-needed flag is cleared when a session description
of type {{RTCSdpType/"answer"}} [= set a session description | is
set =] successfully, and the supplied description
matches the state of the {{RTCRtpTransceiver}}s and
{{RTCDataChannel}}s that currently exist on the
{{RTCPeerConnection}}. Specifically, this means that all
Expand Down Expand Up @@ -5797,7 +5806,7 @@ <h4>
<p class="note">
The negotiation-needed flag will be updated once the state
transitions to {{RTCSignalingState/"stable"}}, as part of
the steps for [= setting an RTCSessionDescription =].
the steps for [= setting a session description =].
</p>
</li>
<li>
Expand Down Expand Up @@ -7960,7 +7969,8 @@ <h2>
<p>
If <var>sender</var> is not in <var>senders</var> (which
indicates its transceiver was stopped or removed due to
[= setting an RTCSessionDescription =] of type
[= setting a session description =] of
{{RTCSessionDescriptionInit/type}}
{{RTCSdpType/"rollback"}}), then abort these steps.
</p>
</li>
Expand Down Expand Up @@ -8021,10 +8031,8 @@ <h2>
</p>
<p data-tests="RTCPeerConnection-addTransceiver.https.html">
The initial value of {{RTCRtpTransceiver/mid}} is null.
Setting a new {{RTCSessionDescription}} may change it to a
non-null value, as defined in <span data-jsep=
"processing-a-local-desc processing-a-remote-desc">[[!JSEP]]</span>
and [= setting an RTCSessionDescription =].
[= Setting a session description =] may later change it to a
non-null value.
</p>
<p data-tests="protocol/simulcast-offer.html">
The {{RTCRtpTransceiverInit/sendEncodings}} argument can be
Expand Down Expand Up @@ -10490,8 +10498,8 @@ <h3>
<div class="note">
Creating a transceiver does not create the underlying
{{RTCDtlsTransport}} and {{RTCIceTransport}} objects. This will only
occur as part of the process of [= set the RTCSessionDescription |
setting an RTCSessionDescription =].
occur as part of the process of [= set the session description |
setting a session description =].
</div>
<div>
<pre class="idl" data-tests="idlharness.https.window.js">[Exposed=Window]
Expand Down Expand Up @@ -11070,7 +11078,7 @@ <h3>
{{RTCPeerConnection/setRemoteDescription}} method of the
{{RTCPeerConnection}} object, the [= simulcast envelope =] is
configured on the {{RTCRtpTransceiver}} to contain the layers
described by the specified {{RTCSessionDescription}}. Once the
described by the specified session description. Once the
envelope is determined, layers cannot be removed. They can be
marked as inactive by setting the
{{RTCRtpEncodingParameters/active}} member to <code>false</code>
Expand Down

0 comments on commit a07a324

Please sign in to comment.