-
-
Notifications
You must be signed in to change notification settings - Fork 981
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
Implement ICE restarts #579
Comments
I would love to have this feature for a new project I'm working on. @t-mullen Any idea how you'd like the API design for this to work? |
simple-peer should detect the ice connection state Restart is just renegotiation with https://developer.mozilla.org/en-US/docs/Web/API/RTCOfferOptions/iceRestart |
A few questions:
|
|
In my application, I configure peers in a star topology where clients connect to a central host. As an optimization for this approach, clients disconnect from the signal server after establishing a connection to the host. When the client switches to a Some changes I'd like to propose:
With these changes, it would be up to the simple-peer consumer to decide whether to handle ICE restarts and if it should start with the initiator or non-initiator. |
The non-initiator isn't actually capable of initiating renegotiation or ICE restart, it's only capable of requesting it from the initiator. At least with the way we currently handle glare. Maybe if we add rollbacks this can be a little simpler. If you need to reconnect both peers to the signalling server, you should queue signals until that happens instead of delaying the ICE restart - otherwise you'll slow down gathering (and reconnection). I think the best option is where only the initiator watches for |
Where does this feature stand? Do you need someone to work on it? I have a very strong interest in the feature, and would be able to commit working hours to it. |
@fauxsoup Are you still interested in committing working hours to this? I'd love to get this feature in. |
Absolutely. Just want to know where to start. I saw a pull request with an example implementation, but it was out of date. Should I start there, or has other development commenced on this elsewhere? |
I am facing this very issue among multiple libraries ( |
Hello! Same here as @draeder ; and trying to figure out what's the expected (webrtc) way to restart a connection after the browser error logs From my investigation it seems that there might be browser specific behaviors concerning the ICE restart, and the
This This behavior is not the same on
|
When network conditions change or the current route is congested, it's possible to restart ICE and gather/select a new candidate pair. Apparently this happens very frequently with cellular networks or with certain types of NATs.
Restart is done by calling
createOffer
with theiceRestart
option wheniceConnectionState == 'failed'
.As an optimization, ICE restart can be done preemptively when
iceConnectionState == 'disconnected'
(before'failed'
) and it won't immediately bounce back toconnected
.The text was updated successfully, but these errors were encountered: