Merge branch 'fixes' of github.com:questo-ai/decentralized-video-chat into fixes

This commit is contained in:
Taichi Kato 2020-06-03 17:44:45 +08:00
commit e96bf5f62f
1 changed files with 6 additions and 0 deletions

View File

@ -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]