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

View File

@ -203,6 +203,12 @@ var VideoChat = {
logIt("connected"); logIt("connected");
break; break;
case "disconnected": 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); logIt("disconnected - UUID " + uuid);
VideoChat.remoteVideoWrapper.removeChild( VideoChat.remoteVideoWrapper.removeChild(
document.querySelectorAll(`[uuid="${uuid}"]`)[0] document.querySelectorAll(`[uuid="${uuid}"]`)[0]