Skip to content

Commit

Permalink
Queue two tasks upon finishing ICE gathering.
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ivar committed Aug 21, 2023
1 parent 21d59fe commit e975f6c
Showing 1 changed file with 28 additions and 31 deletions.
59 changes: 28 additions & 31 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -11898,16 +11898,11 @@ <h3>
</div>
<p>
When the [= ICE Agent =] indicates that it began gathering a [=
generation =] of candidates for an {{RTCIceTransport}} <var>transport</var>, the user
generation =] of candidates for an {{RTCIceTransport}} <var>transport</var>
associated with an {{RTCPeerConnection}} <var>connection</var>, the user
agent MUST queue a task that runs the following steps:
</p>
<ol class=algorithm>
<li class="no-test-needed">
<p>
Let <var>connection</var> be the {{RTCPeerConnection}} object
associated with <var>transport</var>.
</p>
</li>
<li>
<p>
If <var>connection</var>.{{RTCPeerConnection/[[IsClosed]]}} is
Expand Down Expand Up @@ -11954,17 +11949,12 @@ <h3>
</ol>
<p>
When the [= ICE Agent =] is finished gathering a [= generation =] of
candidates for an {{RTCIceTransport}} <var>transport</var>, and those candidates have been
surfaced to the application, the user agent MUST queue a task that
runs the following steps:
candidates for an {{RTCIceTransport}} <var>transport</var> associated
with an {{RTCPeerConnection}} <var>connection</var>, and those candidates have been
surfaced to the application, the user agent MUST queue two tasks.
The first task MUST run the following steps:
</p>
<ol class=algorithm>
<li class="no-test-needed">
<p>
Let <var>connection</var> be the {{RTCPeerConnection}} object
associated with <var>transport</var>.
</p>
</li>
<li>
<p>
If <var>connection</var>.{{RTCPeerConnection/[[IsClosed]]}} is
Expand All @@ -11973,24 +11963,39 @@ <h3>
</li>
<li>
<p>
Let <var>emptyCandidate</var> be the result of [= creating an
Let <var>endOfGatheringCandidate</var> be the result of [= creating an
RTCIceCandidate =] with a new dictionary whose
{{RTCIceCandidateInit/sdpMid}} and
{{RTCIceCandidateInit/sdpMLineIndex}} are set to the values
associated with this {{RTCIceTransport}},
{{RTCIceCandidateInit/usernameFragment}} is set to the username
fragment of the [= generation =] of candidates for which
gathering finished, and {{RTCIceCandidateInit/candidate}} is set
to an empty string.
gathering finished, and {{RTCIceCandidateInit/candidate}} is set to `""`.
</p>
</li>
<li>
<p>
If another [= generation =] of candidates is still being
gathered, [= fire an event =] named {{RTCPeerConnection/icecandidate}} using the
[= Fire an event =] named {{RTCPeerConnection/icecandidate}} using the
{{RTCPeerConnectionIceEvent}} interface with the candidate
attribute set to <var>emptyCandidate</var> at
<var>connection</var>, and abort these steps.
attribute set to <var>endOfGatheringCandidate</var> at
<var>connection</var>.
</p>
</li>
</ol>
<p>
The second task MUST run the following steps:
</p>
<ol class=algorithm>
<li>
<p>
If <var>connection</var>.{{RTCPeerConnection/[[IsClosed]]}} is
<code>true</code>, abort these steps.
</p>
</li>
<li>
<p>
If another [= generation =] of candidates is still being
gathered, abort these steps.
</p>
<div class="note">
This may occur if an ICE restart is initiated while the ICE agent
Expand Down Expand Up @@ -12021,14 +12026,6 @@ <h3>
<li>
<p>Do not read or modify state beyond this point.</p>
</li>
<li>
<p>
[= Fire an event =] named {{RTCPeerConnection/icecandidate}} using the
{{RTCPeerConnectionIceEvent}} interface with the candidate
attribute set to <var>emptyCandidate</var> at
<var>connection</var>.
</p>
</li>
<li>
<p>
[= Fire an event =] named {{RTCIceTransport/gatheringstatechange}} at
Expand Down

0 comments on commit e975f6c

Please sign in to comment.