Skip to content

Commit

Permalink
Add candidatepairadded event
Browse files Browse the repository at this point in the history
This event adds symmetry to the candidate pair lifecycle, so apps
are informed of both candidate pair formation and pruning.

The candidatepairadded event is not strictly necessary for the
pruneproposed event, but makes it easier to use.
  • Loading branch information
sam-vi committed Aug 18, 2023
1 parent e4f7544 commit 7dbb886
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,25 @@ <h3>
</ol>
<pre class="idl">
partial interface RTCIceTransport {
attribute EventHandler oncandidatepairadded;
attribute EventHandler oncandidatepairpruneproposed;
};</pre>
<section>
<h2>Attributes</h2>
<dl data-link-for="RTCIceTransport" data-dfn-for="RTCIceTransport" class="attributes">
<dt>
<dfn>oncandidatepairadded</dfn> of type <span class="idlAttrType">{{EventHandler}}</span>
</dt>
<dd>
<p>
The event type of this event handler is {{candidatepairadded}}.
</p>
<p>
When the [= ICE agent =] has formed a candidate pair, the [= user agent =] MUST queue a task to [= fire an
event =] named {{candidatepairadded}} using the {{RTCIceCandidatePairEvent}} interface with the
{{RTCIceCandidatePairEvent/candidatePair}} attribute set to the formed candidate pair.
</p>
</dd>
<dt>
<dfn>oncandidatepairpruneproposed</dfn> of type <span class="idlAttrType">{{EventHandler}}</span>
</dt>
Expand All @@ -774,7 +788,7 @@ <h2>
<dfn>RTCIceCandidatePairEvent</dfn>
</h2>
<p>
The {{RTCIceTransport/candidatepairpruneproposed}} event uses the {{RTCIceCandidatePairEvent}} interface.
The {{RTCIceTransport/candidatepairadded}} and {{RTCIceTransport/candidatepairpruneproposed}} events use the {{RTCIceCandidatePairEvent}} interface.
</p>
<div>
<pre class="idl">[Exposed=Window]
Expand Down Expand Up @@ -1250,6 +1264,13 @@ <h2>Event summary</h2>
</tr>
</thead>
<tbody>
<tr>
<th scope=row><dfn data-dfn-for="RTCIceTransport" data-dfn-type=event>candidatepairadded</dfn></th>
<td>{{RTCIceCandidatePairEvent}}</td>
<td>
The [= ICE agent =] has formed a candidate pair and is making it available to the script.
</td>
</tr>
<tr>
<th scope=row><dfn data-dfn-for="RTCIceTransport" data-dfn-type=event>candidatepairpruneproposed</dfn></th>
<td>{{RTCIceCandidatePairEvent}}</td>
Expand Down

0 comments on commit 7dbb886

Please sign in to comment.