restartIce method
The restartIce()
method of the RTCPeerConnection interface allows
a web application to request that candidate gathering be redone on both
ends of the connection.
This simplifies the process by allowing the same method to be used by
either the caller or the receiver to trigger an ICE restart.
After restartIce()
returns, the offer returned by the next call to
RTCPeerConnection.createOffer is automatically configured to trigger ICE
restart on both the local peer (once the local peer has been set) and on
the remote peer, once the offer is sent across your signaling mechanism
and the remote peer has set its description as well.
restartIce()
causes the
RTCPeerConnection.negotiationneeded_event
event to be fired on the
RTCPeerConnection
to inform the application that it should perform
negotiation using its signaling channel.
If negotiation fails to complete—either due to rollback or because
incoming offers are in the process of being negotiated—the
RTCPeerConnection will remember that you requested ICE restart.
The next time the connection's RTCPeerConnection.signalingState changes
to stable
, the connection will fire the
RTCPeerConnection.negotiationneeded_event
event.
This process continues until an ICE restart has been successfully
completed.
Implementation
external void restartIce();