[webrtc-pc] Merge the steps for updating candidate pair and ice transport state (#2283)

henbos has just created a new issue for https://github.com/w3c/webrtc-pc:

== Merge the steps for updating candidate pair and ice transport state ==
We currently do this in two separately queued tasks:

> When the ICE Agent indicates that the RTCIceTransportState for an RTCIceTransport has changed, the user agent MUST queue a task that runs the following steps:

> When the ICE Agent indicates that the selected candidate pair for an RTCIceTransport has changed, the user agent MUST queue a task that runs the following steps:

There is room for interpretation which task you queue first. In either case, since they are tasks queued separately and each task fires an event, it is observable which thing happened first.

I think the correct behavior would be to update both the ICE state and the candidate pair, and to fire both events (onstatechange, onselectedcandidatepairchanged)

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2283 using your GitHub account

Received on Thursday, 29 August 2019 14:39:57 UTC