ICE Restart. Recover video call, after the restoration of the Internet connection.

1,316 views
Skip to first unread message

Vasiliy Komarov

unread,
Dec 30, 2015, 7:24:07 AM12/30/15
to discuss-webrtc, nexs...@mail.ru
Hello. Happy New Year to you.
I would like to know about the video connections.
Previously, if a user lost to bridge, when you connect back to it it restored.
For example, one user loses connection during a call, after 2 minutes, he restores it while recovering video.
Now, however, if the user has lost the connection, if it does not recover for 10-15 seconds, then the video will not be restored, too. And he gets oniceconnectionstatechange event "failed".
I would like to know, there were some changes in connection with the completion of the user?
Is it possible to increase the period of trying to restore the call?

Peter Thatcher

unread,
Dec 30, 2015, 12:37:08 PM12/30/15
to discuss-webrtc, nexs...@mail.ru
We have made some changes to the ICE code.  It used to go to a "disconnected" state but keep connections around indefinitely even if it were not trying to reestablish the connection, which means that it would have been possible for the remote peer to reestablish the connection.  But we've changed that to be more standards-compliant, in two ways:

1.  The ICE connection is now torn down if it hasn't received anything for 30 seconds.
2.  The ICE connection state will go to "failed" once there are no more connections.

The correct way for an application to handle this is to trigger an ICE restart when the ICE connection state goes to either "failed" or "disconnected" for an extended period of time (in fact, I'd recommend you trigger an ICE restart immediately after it goes to "failed" or "disconnected"). 

The behavior you were relying on was a hold-over from code written before ICE was fully standardized.  I'm afraid you'll have to update your application to work with how standard ICE works (with ICE restarts).  The good news is that I expect it will be faster to reconnect and more reliable to reconnect if you do so.

Vasiliy Komarov

unread,
Dec 31, 2015, 9:08:21 AM12/31/15
to discuss-webrtc, nexs...@mail.ru
Thank you for reply.
How i can trigger a "ice restart"?
I need create new offer and setLocalDescription? And send on signaling server? 

среда, 30 декабря 2015 г., 20:37:08 UTC+3 пользователь Peter Thatcher написал:

Christoffer Jansson

unread,
Jan 4, 2016, 4:03:15 AM1/4/16
to discuss-webrtc, nexs...@mail.ru
On Thursday, December 31, 2015 at 3:08:21 PM UTC+1, Vasiliy Komarov wrote:
Thank you for reply.
How i can trigger a "ice restart"?
I need create new offer and setLocalDescription? And send on signaling server? 
Yes but AFAIK you also need to set iceRestart to true in offerOptions when creating the initial offer.
Reply all
Reply to author
Forward
0 new messages