UNPKG

open-easyrtc

Version:

Open-EasyRTC enables quick development of WebRTC

25 lines 1.01 kB
switch (connState) { case "connected": onPeerOpen(otherUser) break; case "failed": if (pc.restartIce) { logDebug("ICE failed, attempting restart"); pc.restartIce(); } else { if (failureCB) { failureCB(self.errCodes.NOVIABLEICE, "No usable STUN/TURN path"); } closePeer(otherUser) } break; case "disconnected": onPeerFailing(otherUser) break; case "closed": closePeer(otherUser) break; case "completed": onPeerRecovered(otherUser) break; }