Skip to content

Commit

Permalink
Merge pull request w3c#177 from jan-ivar/formed
Browse files Browse the repository at this point in the history
Don't fire icecandidatepairadd if closed + avoid competing normative prose
  • Loading branch information
aboba authored Dec 7, 2023
2 parents 45ce1cb + 44c10dd commit 92bea5a
Showing 1 changed file with 47 additions and 21 deletions.
68 changes: 47 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ <h2>Terminology</h2>
<p>
The terms [= event =], [= event handlers =] and [= event handler event types =] are defined in [[!HTML]].
</p>
<p>
The process of <dfn data-lt="form|formed|forming">forming</dfn> a candidate pair is defined in
[[RFC8445]] Section 6.1.2.2.
</p>
<p>
The process of <dfn data-lt="nominate|nominated|nomination">nominating</dfn> a candidate pair is defined in
[[RFC8445]] Section 8.1.1.
Expand Down Expand Up @@ -717,6 +721,41 @@ <h3>
Changing
the selected candidate pair after a successful nomination requires an ICE restart.
</p>
<p>
When the [= ICE agent =] has [= formed =] a candidate pair, the [= user agent =] MUST [= queue a task =] to <dfn
id="rtcicetransport-add">add a candidate pair</dfn>:
</p>
<ol class="algorithm">
<li>
<p>
Let |connection:RTCPeerConnection| be the {{RTCPeerConnection}} object associated with this [= ICE agent =].
</p>
</li>
<li>
<p>
If <var>connection</var>.{{RTCPeerConnection/[[IsClosed]]}} is
<code>true</code>, abort these steps.
</p>
</li>
<li>
<p>
Let |candidatePair:RTCIceCandidatePair| be the candidate pair that was [= formed =].
</p>
</li>
<li>
<p>
Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|.
</p>
</li>
<li>
<p>
[= Fire an event =] named
{{RTCIceTransport/icecandidatepairadd}} at |transport|, using {{RTCIceCandidatePairEvent}},
with the {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} attributes
initialized to the local and remote candidates, respectively, of |candidatePair|.
</p>
</li>
</ol>
<p>
When the [= ICE agent =] has picked a candidate pair to {{nominate}} as the selected candidate pair, the [= user
agent =]
Expand Down Expand Up @@ -796,12 +835,12 @@ <h3>
</li>
<li>
<p>
Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with this candidate pair.
Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being removed.
</p>
</li>
<li>
<p>
Let |candidatePair:RTCIceCandidatePair| be the candidate pair which is being removed.
Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|.
</p>
</li>
<li>
Expand Down Expand Up @@ -865,39 +904,26 @@ <h2>Attributes</h2>
</dt>
<dd>
<p>
The event type of this event handler is {{icecandidatepairadd}}.
</p>
<p>
When the [= ICE agent =] has formed a candidate pair, the [= user agent =] MUST queue a task to [= fire an
event =] named {{icecandidatepairadd}} using the {{RTCIceCandidatePairEvent}} interface, with the
{{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} attributes set to the local and
remote candidates, respectively, of the formed candidate pair.
The event type of this event handler is {{icecandidatepairadd}}, and is fired as part of
the [= add a candidate pair =] algorithm.
</p>
</dd>
<dt>
<dfn>onicecandidatepairremove</dfn> of type <span class="idlAttrType">{{EventHandler}}</span>
</dt>
<dd>
<p>
The event type of this event handler is {{icecandidatepairremove}}.
</p>
<p>
When the [= ICE agent =] has picked a candidate pair to remove, but before the removal has actually occurred,
the [= user agent =] MUST run the steps to [= remove a candidate pair =].
The event type of this event handler is {{icecandidatepairremove}}, and is fired as part of
the [= remove a candidate pair =] algorithm.
</p>
</dd>
<dt>
<dfn>onicecandidatepairnominate</dfn> of type <span class="idlAttrType">{{EventHandler}}</span>
</dt>
<dd>
<p>
The event type of this event handler is {{icecandidatepairnominate}}.
</p>
<p>
When the [= ICE agent =] has picked a candidate pair to {{nominate}} as the selected candidate pair, but
before
the
nomination takes place, the [= user agent =] MUST run the steps to [= nominate a candidate pair =].
The event type of this event handler is {{icecandidatepairnominate}}, and is fired as part
of the [= nominate a candidate pair =] algorithm.
</p>
</dd>
</dl>
Expand Down

0 comments on commit 92bea5a

Please sign in to comment.