pc.oniceconnectionstatechange = () => {
if (pc.iceConnectionState === "failed") {
pc.setConfiguration(restartConfig);
pc.restartIce();
}
};Lifetime of a WebRTC session / notebook
Lifetime of a WebRTC session
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.