w3c / webrtc-extensions

A repository for experimental additions to the WebRTC API
https://w3c.github.io/webrtc-extensions/
Other
58 stars 19 forks source link

What happens if setSelectedCandidatePair() is called early? #180

Closed jan-ivar closed 10 months ago

jan-ivar commented 10 months ago

In § 9. RTCIceTransport extensions between two "When the ICE agent [does X]" sections, it says:

We should reserve "may" and "MAY" for implementations and avoid using it to describe requirements on applications.

The intent of this statement is also unclear, since an application can call a method at any time. If we meant for this method to throw or reject if called outside this condition, that needs to go into its algorithm.

Also, the change the selected candidate pair algorithm itself has some bugs, like inferring transport from the passed-in candidatePair.

I think it's better to move this algorithm to the method itself.

Assuming there is no limit on when this method can be called, I'll do a PR to that effect.

henbos commented 10 months ago

CC @sam-vi