Skip to content

Commit

Permalink
Allow setSelected on the controlled side.
Browse files Browse the repository at this point in the history
If nomination is being deferred, either side is allowed to send
on a pair of their choosing. Only nomination is the exclusive
prerogative the controlling agent.
  • Loading branch information
sam-vi committed Sep 6, 2023
1 parent 2778d5f commit e0e07a5
Showing 1 changed file with 17 additions and 34 deletions.
51 changes: 17 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,11 @@ <h3>
</p>
<p>
The [= ICE agent =] performs connectivity checks to identify valid candidate pairs on which it is possible to send
and
receive media and data. In order to conclude ICE processing, the [= ICE agent =] {{nominates}} a valid candidate
pair
as the selected candidate pair. Prior to nomination, any valid candidate pair may be used to exchange packets. Once
a
candidate pair is nominated successfully, only the selected candidate pair may be used to exchange packets. Changing
and receive media and data. In order to conclude ICE processing, the [= ICE agent =] {{nominates}} a valid candidate
pair as the selected candidate pair. Prior to nomination, any valid candidate pair may be used to send and receive data.
Once
a candidate pair is nominated successfully, only the selected candidate pair will be used to send and receive data.
Changing
the selected candidate pair after a successful nomination requires an ICE restart.
</p>
<p>
Expand Down Expand Up @@ -767,9 +766,8 @@ <h3>
</li>
<li>
<p>
If |accepted| is <code>false</code>, instruct the [= ICE agent =] to not {{nominate}} |candidatePair|, and
instead
to continue to perform connectivity checks. The [= ICE agent =] may exchange packets using the candidate pair
If |accepted| is <code>false</code>, instruct the [= ICE agent =] to not {{nominate}} |candidatePair|, and instead to
continue to perform connectivity checks. The [= ICE agent =] may continue to send data using the candidate pair
indicated by |candidatePair| unless instructed to use another candidate pair with
{{RTCIceTransport/setSelectedCandidatePair}}.
</p>
Expand All @@ -782,10 +780,9 @@ <h3>
</ol>
<p>
If the application defers the {{nomination}} of a candidate pair by cancelling the
{{RTCIceTransport/icecandidatepairnominate}} event, it may select a different candidate pair to exchange packets by
calling
{{RTCIceTransport/setSelectedCandidatePair}}. When the method is called, the [= user agent =] MUST run the steps to
<dfn id="rtcicetransport-select">change the selected candidate pair</dfn>:
{{RTCIceTransport/icecandidatepairnominate}} event, it may select a different candidate pair to send data by calling
{{RTCIceTransport/setSelectedCandidatePair}}. When the method is called, the [= user agent =] MUST run the steps to <dfn
id="rtcicetransport-select">change the selected candidate pair</dfn>:
</p>
<ol class="algorithm">
<li>
Expand All @@ -809,18 +806,6 @@ <h3>
If |transport|.{{RTCIceTransport/[[ProposalPending]]}} is <code>true</code>, [= exception/throw =] an {{InvalidStateError}}.
</p>
</li>
<li>
<p>
If <var>transport</var>.{{RTCIceTransport/[[IceRole]]}} is {{RTCIceRole/"controlled"}}, [= exception/throw =] a
{{NotAllowedError}}.
</p>
</li>
<li>
<p>
If <var>transport</var>.{{RTCIceTransport/[[IceRole]]}} is {{RTCIceRole/"unknown"}}, [= exception/throw =] an
{{InvalidStateError}}.
</p>
</li>
<li>
<p>
If |transport|.{{RTCIceTransport/[[IceTransportState]]}} is either of
Expand All @@ -842,14 +827,14 @@ <h3>
</li>
<li>
<p>
Instruct the [= ICE agent =] to use |candidatePair| to send and receive packets, and continue to the steps for a
change in the selected candidate pair (leading up to
{{RTCIceTransport/onselectedcandidatepairchange}}).
Instruct the [= ICE agent =] to use |candidatePair| to send data, and continue to the steps for a change in the selected
candidate pair (leading up to {{RTCIceTransport/onselectedcandidatepairchange}}).
</p>
</li>
</ol>
<p class="note">
After changing the selected candidate pair, the [= ICE agent =] may attempt to [= nominate the candidate pair =] as
After changing the selected candidate pair, the controlling [= ICE agent =] may attempt to [= nominate the candidate
pair =] as
well to conclude ICE processing. The application may cancel the nomination to allow further changes to the selected
candidate pair.
</p>
Expand Down Expand Up @@ -985,11 +970,9 @@ <h2>Methods</h2>
</dt>
<dd>
<p>
The {{setSelectedCandidatePair}} method attempts to change the selected candidate pair. If successful, packets
will be
sent and received on the provided candidate pair. When this method is invoked, the [= user agent =] MUST run
the
steps to [= change the selected candidate pair =].
The {{setSelectedCandidatePair}} method attempts to change the selected candidate pair. If successful, data will be sent
on the provided candidate pair. When this method is invoked, the [= user agent =] MUST run the steps to [= change the
selected candidate pair =].
</p>
</dd>
</dl>
Expand Down

0 comments on commit e0e07a5

Please sign in to comment.