Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an internal slot for active candidate pairs. #194

Closed
wants to merge 9 commits into from
44 changes: 39 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,17 @@ <h3>
Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|.
</p>
</li>
<li>
<p>
[=Assert=]: |candidatePair| does not [= candidate pair match | match =] any
item in |transport|.{{RTCIceTransport/[[CandidatePairs]]}}
</p>
</li>
<li>
<p>
[= list/Append =] |candidatePair| to {{RTCIceTransport/[[CandidatePairs]]}}.
</p>
</li>
henbos marked this conversation as resolved.
Show resolved Hide resolved
<li>
<p>
[= Fire an event =] named
Expand Down Expand Up @@ -881,14 +892,29 @@ <h3>
</li>
<li>
<p>
Otherwise, instruct the [= ICE agent =] to remove the candidate pair indicated by |candidatePair|.
Otherwise (if |accepted| is <code>true</code>), run the following steps:
</p>
<ol>
<li>
<p>
[= list/Remove =] |candidatePair| from |transport|.{{RTCIceTransport/[[CandidatePairs]]}}.
</p>
</li>
<li>
<p>
Instruct the [= ICE agent =] to remove the candidate pair indicated by |candidatePair|.
</p>
</li>
</ol>
</li>
</ol>
<p>
The {{RTCIceTransport}} object is extended by adding the following internal slot:
The {{RTCIceTransport}} object is extended by adding the following internal slots:
</p>
<ul>
<li>
<dfn data-dfn-for="RTCIceTransport">[[\CandidatePairs]]</dfn> initialized to an empty list.
henbos marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li>
<dfn data-dfn-for="RTCIceTransport">[[\ProposalPending]]</dfn> initialized to <code>false</code>.
</li>
Expand Down Expand Up @@ -981,8 +1007,8 @@ <h2>Methods</h2>
</li>
<li>
<p>
If |candidatePair| does not describe a candidate pair formed for [=this=] {{RTCIceTransport}} and sent in
{{RTCIceTransport/onicecandidatepairadd}}, [= exception/throw =] a {{NotFoundError}}.
If |candidatePair| does not [= candidate pair match | match =] any item in [=this=].
{{RTCIceTransport/[[CandidatePairs]]}}, [= exception/throw =] a {{NotFoundError}}.
</p>
</li>
<li>
Expand Down Expand Up @@ -1071,7 +1097,15 @@ <h2>Methods</h2>
</li>
<li>
<p>
If the {{RTCIceCandidatePair/local}} and {{RTCIceCandidatePair/remote}} attributes of <var>candidatePair</var> do not match a pairing of {{RTCIceCandidatePairEvent/local}} and {{RTCIceCandidatePairEvent/remote}} respectively sent in {{RTCIceTransport/onicecandidatepairadd}}, [= exception/throw =] a {{NotFoundError}}.
If |candidatePair| does not [= candidate pair match | match =] any item in [=this=].
{{RTCIceTransport/[[CandidatePairs]]}}, [= exception/throw =] a {{NotFoundError}}.
</p>
</li>
<li>
<p>
[= list/Remove =] the item in
[=this=].{{RTCIceTransport/[[CandidatePairs]]}} that
[= candidate pair match | matches =] |candidatePair|.
</p>
</li>
<li>
Copy link
Member

@jan-ivar jan-ivar Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, do we need to clear [[CandidatePairs]] at some point during ICE restart?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, I filed #196 to decide if we need to add more steps or if this is already covered by the existing removal steps, including whether or not the onicecandidatepairremoved should fire?

Expand Down
Loading