-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
Fixes: w3c#188. The [[CandidatePairs]] slot in RTCIceTransport tracks candidate pairs formed by the ICE agent and surfaced to the application, and not removed via icecandidatepairremove or removeCandidatePair(). The slot is used to validate the inputs to selectCandidatePair() and removeCandidatePair().
This depends on several other PRs to be merged first: - w3c#170: Addition of removeCandidatePair method - w3c#192: Definition of candidate match algo - alternately, w3c/webrtc-pc#2906 to enforce RTCIceCandidate object equality - w3c#193: Definition of candidate pair match algo - w3c#194: Addition of CandidatePairs internal slot
This depends on several other PRs to be merged first: - w3c#170: Addition of removeCandidatePair method - w3c#192: Definition of candidate match algo - alternately, w3c/webrtc-pc#2906 to enforce RTCIceCandidate object equality - w3c#193: Definition of candidate pair match algo - w3c#194: Addition of CandidatePairs internal slot
This depends on several other PRs to be merged first: - w3c#170: Addition of removeCandidatePair method - w3c#192: Definition of candidate match algo - alternately, w3c/webrtc-pc#2906 to enforce RTCIceCandidate object equality - w3c#193: Definition of candidate pair match algo - w3c#194: Addition of CandidatePairs internal slot
Instead, there should be a requirement on the user agent to validate the application's input. This requirement is added by w3c#194.
This depends on several other PRs to be merged first: - w3c#170: Addition of removeCandidatePair method - w3c#192: Definition of candidate match algo - alternately, w3c/webrtc-pc#2906 to enforce RTCIceCandidate object equality - w3c#193: Definition of candidate pair match algo - w3c#194: Addition of CandidatePairs internal slot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
index.html
Outdated
Let |transport:RTCIceTransport| be the {{RTCIceTransport}} object associated with |candidatePair|. | ||
</p> | ||
</li> | ||
<li> | ||
<p> | ||
[= list/Append =] |candidatePair| to {{RTCIceTransport/[[CandidatePairs]]}}. | ||
</p> | ||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github won't let me comment on the line directly above this section, which is:
<p>
Let |candidatePair:RTCIceCandidatePair| be the candidate pair that was [= formed =].
</p>
While readers can hover over the candidatePair
variable to learn its type, I think we need to spell out in prose what the type is now, since to a non-interactive reader candidatePair
reads like an internal concept so far in this algorithm. We need to expound on its type before adding it to [[CandidatePairs]] since objects there need to be usable with the new match algorithm.
Also this appears to be the right place to instantiate candidate interfaces. Something like (updated):
<p>
Let |candidatePair:RTCIceCandidatePair| be a new {{RTCIceCandidatePair}} dictionary
with its {{RTCIceCandidatePair/local}} and {{RTCIceCandidatePair/remote}} members
initialized to new {{RTCIceCandidate}}s representing the local and remote part of the
[= formed =] pair respectively.
</p>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To help Sameer make progress while OOO, I re-uploaded this PR as #197 with this comment addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the cleanup. I'd like to specify some more invariants around this internal slot.
</li> | ||
<li> | ||
<p> | ||
[= list/Remove =] all items that [= candidate pair match | match =] |candidatePair| from [=this=].{{RTCIceTransport/[[CandidatePairs]]}}. | ||
</p> | ||
</li> | ||
<li> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Co-authored-by: Jan-Ivar Bruaroey <jan-ivar@users.noreply.github.com>
Merged as #197 |
Fixes: #188.
The [[CandidatePairs]] slot in RTCIceTransport tracks candidate pairs formed by the ICE agent and surfaced to the application, and not removed via icecandidatepairremove or removeCandidatePair().
The slot is used to validate the inputs to selectCandidatePair() and removeCandidatePair().
EDIT: To help Sameer make progress while OOO, I've re-uploaded this as #197 with comments addressed.
Preview | Diff