-
Notifications
You must be signed in to change notification settings - Fork 51
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
Missing docs or examples for how to use ICE restart #416
Comments
Quoting from the specification:
For example, if a peer transitions from WiFi to cellular their selected candidate will no longer be usable and no media data will reach the other peer. This causes a disconnect event and the lack of media data can be used as a signal to trigger an ICE restart which will gather new candidates for the cellular connection. However, a disconnect event can also occur due to loss, because the STUN binding requests or responses can be lost, in this case if media is still flowing the ICE connection state should recover. |
I do think we are missing a timeout, in the case when signaling is setup but for some reason the stun packets are not reaching the str0m instance. Str0m will sit there and wait forever and it should probably have a connection timeout. |
I don't agree. Str0m has the The ICE spec says that for "checklist" (we only have one such in str0m): https://www.rfc-editor.org/rfc/rfc8838.html#name-performing-connectivity-che
Trickle ICE also adds the conditions:
To put that together:
Scenario 1 isn't relevant for str0m because we don't have an API for enumerating and providing all ICE candidates before we start the Ergo we only support Scenario 2: Only trickle ICE, even if we don't expect to do any trickling. The remaining question is "what about indicating end-of-candidates"? The stance I have taken here is "why?"
What good does it do to notify str0m that there will never be more candidates? As far as I can see, the only reason is to encode some timeout for going into a "Failed" state. It appears to be a state/code complication only to fulfill the spec. A user of str0m can simply have a timer for the |
I agree with the latest comment. As someone who worked on defining WebRTC's "failed" state, I've always thought of it as mostly useless, especially when trickle ICE is used (as it should be). The rule for ICE restarts is pretty simple: if you have been disconnected more than X seconds, try an ICE restart. You pick the X. |
Ok I added the 5 lines of timeout handling code in our server and I agree :) |
Given that there's no failed/closed ICE state, how should we use ICE restart?
https://github.com/algesten/str0m/blob/main/src/ice/agent.rs#L109
The text was updated successfully, but these errors were encountered: