ICE restart renegotiates the WebRTC connection when network conditions change, for example, switching from WiFi to cellular. Implement it when iceConnectionState transitions to ‘failed’. As an optimisation for mobile surveillance use cases, also monitor the ‘disconnected’ state: wait 2–3 seconds, check getStats() for stalled incoming bytes, and trigger a restart proactively if the connection has not recovered, rather than waiting up to 30 seconds for “failed” to fire. On mobile, where network transitions are frequent, ICE restart is essential for maintaining uninterrupted video streams.

