mirror of
https://github.com/ianramzy/decentralized-video-chat.git
synced 2024-11-17 07:39:21 +08:00
add reloading for erronous disconnects
This commit is contained in:
parent
fc1b1dc460
commit
fb3c28b6aa
@ -203,6 +203,12 @@ var VideoChat = {
|
||||
logIt("connected");
|
||||
break;
|
||||
case "disconnected":
|
||||
// First possibility: we disconnected from the peer
|
||||
if (VideoChat.socket.connect().connected === false) {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
// Second possibility: the peer disconnected from us
|
||||
logIt("disconnected - UUID " + uuid);
|
||||
VideoChat.remoteVideoWrapper.removeChild(
|
||||
document.querySelectorAll(`[uuid="${uuid}"]`)[0]
|
||||
|
Loading…
Reference in New Issue
Block a user