Re: [webrtc-pc] Consider making RTCIceCandidatePair an interface (#2930)

> @sam-vi thoughts on this? Should we discuss it at the next meeting perhaps?

I agree with this proposal. I will work on some next steps.

> This seems like a mistake, allowing JS to compose invalid pairs and pass them as inputs.

I can't be certain about the motivation for the original definition as a dictionary. But I imagine that prior to [selectCandidatePair](https://w3c.github.io/webrtc-extensions/#dom-rtcicetransport-selectcandidatepair) and [removeCandidatePair](https://w3c.github.io/webrtc-extensions/#dom-rtcicetransport-removecandidatepair), when the only use of RTCIceCandidatePair was as a return value for [getSelectedCandidatePair](https://w3c.github.io/webrtc-pc/#dom-rtcicetransport-getselectedcandidatepair), a less restrictive definition was adequate and there was no possibility of misuse of a malformed candidate pair.

> I think the goal would be for [selectCandidatePair](https://w3c.github.io/webrtc-extensions/#dom-rtcicetransport-selectcandidatepair) and [removeCandidatePair](https://w3c.github.io/webrtc-extensions/#dom-rtcicetransport-removecandidatepair) to take the interface object (instead of a dictionary with two member interface objects).

+1. With [[[CandidatePairs]]](https://w3c.github.io/webrtc-extensions/#dfn-candidatepairs), it is also possible to avoid pitfalls such as #2906.

> I didn't find any WPT tests for these methods, so they're hopefully not implemented yet @sam-vi is that right?

Correct. I recently got back from parental leave. I will continue work on the implementation and next steps for the spec.

-- 
GitHub Notification of comment by sam-vi
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2930#issuecomment-2034918355 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 3 April 2024 15:24:29 UTC