Skip to content

Commit

Permalink
Return a Promise from selectCandidatePair.
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-vi committed Nov 13, 2023
1 parent 34cf2ef commit 6173949
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ <h3>
attribute EventHandler onicecandidatepairadd;
attribute EventHandler onicecandidatepairremove;
attribute EventHandler onicecandidatepairnominate;
undefined selectCandidatePair(RTCIceCandidatePair candidatePair);
Promise&lt;undefined&gt; selectCandidatePair(RTCIceCandidatePair candidatePair);
};</pre>
<section id="rtcicetransport-attributes">
<h2>Attributes</h2>
Expand Down Expand Up @@ -956,8 +956,36 @@ <h2>Methods</h2>
</li>
<li>
<p>
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}}).
Let |p:Promise| be a new promise.
</p>
</li>
<li>
<p>
In parallel, instruct the [= ICE agent =] to use |candidatePair| to send data.
</p>
<ol>
<li>
<p>
When the [= ICE agent =] has completed selecting |candidatePair|, [= queue a task =] to run the following steps:
</p>
<ol>
<li>
<p>
Run the steps for a change in the selected candidate pair for an {{RTCIceTransport}}, leading up to a change in the {{RTCIceTransport/[[SelectedCandidatePair]]}} internal slot and {{RTCIceTransport/onselectedcandidatepairchange}}.
</p>
</li>
<li>
<p>
Resolve <var>p</var>.
</p>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p>
Return <var>p</var>.
</p>
</li>
</ol>
Expand Down

0 comments on commit 6173949

Please sign in to comment.