Re: [webrtc-pc] RTCIceTransport selected candidate pair behavior when changing state

Thoughts:
- Let getSelectedCandidatePair return null if the state is "new", "checking" or "closed"
- In the "failed" state, return whatever the last selected pair was (or null if there never was a selected pair)
- in "connected" or "completed" states, return the currently selected candidate
There's no way to "disconnected" that doesn't go at least via "connected" or "completed", so in "disconnected", the currently selected candidate should always have a value.

We should remove the "and null otherwise" from step 4 under "When the ICE Agent indicates that the selected candidate pair for an RTCIceTransport has changed". That way, there's no way to change [[SelectedCandidatePair]] from non-null to null, and also no way to fire the event with an empty candidate pair.

(There's no definition for when the ICE Agent indicates that the selected candidate pair has changed; RFC 5245 section 11.1.1 (full implementations) says that the selected pair is empty only if there is no previous selected pair, so this is consistent with the above.)

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

Received on Friday, 7 September 2018 07:29:05 UTC