Skip to content
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

RTCIceTransport selected candidate pair behavior when changing state #1981

Closed
steveanton opened this issue Sep 7, 2018 · 4 comments
Closed
Assignees

Comments

@steveanton
Copy link

I have some questions about the behavior of getSelectedCandidatePair() and the selectedcandidatepairevent in the following cases:

  1. When the RTCIceTransport is closed (due to either RTCPeerConnection close() or SLD/SRD removing it)? Proposal: getSelectedCandidatePair() returns null and the event does not fire.
  2. When the RTCIceTransport transitions to 'disconnected'? Proposal: getSelectedCandidatePair() returns the current value the event does not fire.
  3. When the RTCIceTransport transitions to 'failed'? Proposal: getSelectedCandidatePair() returns null and the event does not fire.

Also, when might the selectedcandidatepairevent fire with a newly-null selected candidate pair?

@alvestrand
Copy link
Contributor

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.)

@steveanton
Copy link
Author

Harald's proposal sounds good to me. I can see the value in keeping the selected candidate pair set when transitioning to "failed".

@alvestrand
Copy link
Contributor

This issue was not resolved at TPAC. Short notes said "SelectedCandidatePair needs further work (do candidates go away?)"

@aboba
Copy link
Contributor

aboba commented Aug 13, 2019

Proposal:

When the RTCIceTransport.state is new or closed (due to either RTCPeerConnection close() or SLD/SRD removing it)? Proposal: getSelectedCandidatePair() returns null and the event does not fire.
When the RTCIceTransport.state transitions to 'disconnected'? Proposal: getSelectedCandidatePair() returns the current value and the event does not fire.
When the RTCIceTransport.state transitions to 'failed'? Proposal: getSelectedCandidatePair() returns the current value and the event does not fire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants