From ea2e8dc5956250a1fc84f970466263a968b631cb Mon Sep 17 00:00:00 2001 From: "Glitch (peerjs-video)" Date: Sat, 12 Sep 2020 22:58:47 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=F0=9F=9B=A9=20Checkpoint=20./publi?= =?UTF-8?q?c/main.js:5975361/1081=20./views/index.ejs:5975361/129?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/main.js | 11 +++++++++++ views/index.ejs | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/public/main.js b/public/main.js index b2a3f68..fb4eb78 100644 --- a/public/main.js +++ b/public/main.js @@ -89,12 +89,17 @@ var app = new Vue({ conn.on('close', () => { this.connections = this.connections.filter(c => c.connectionId === conn.connectionId); this.calls = this.calls.filter(c => c.peer !== conn.peer); + this.videoCalls = this.videoCalls.filter(c => c.peer !== conn.peer); + this.audioCalls = this.audioCalls.filter(c => c.peer !== conn.peer); this.logMessage(`${conn.peer} closed connection.`); console.log(`[Out] Connection closed with ${conn.peer}.`); }); conn.on('error', () => { this.connections = this.connections.filter(c => c.connectionId === conn.connectionId); this.calls = this.calls.filter(c => c.peer !== conn.peer); + this.videoCalls = this.videoCalls.filter(c => c.peer !== conn.peer); + this.audioCalls = this.audioCalls.filter(c => c.peer !== conn.peer); + this.logMessage(`${conn.peer} lost connection.`); console.warn(`[Out] Connection error ${conn.connectionId} with ${conn.peer}.`); }); @@ -153,11 +158,17 @@ var app = new Vue({ conn.on('close', () => { this.connections = this.connections.filter(c => c.connectionId === conn.connectionId); this.calls = this.calls.filter(c => c.peer !== conn.peer); + this.videoCalls = this.videoCalls.filter(c => c.peer !== conn.peer); + this.audioCalls = this.audioCalls.filter(c => c.peer !== conn.peer); this.logMessage(`${conn.peer} closed connection.`); console.log('[Inc] closed conenction', conn) }); conn.on('error', () => { this.connections = this.connections.filter(c => c.connectionId === conn.connectionId); + this.calls = this.calls.filter(c => c.peer !== conn.peer); + this.videoCalls = this.videoCalls.filter(c => c.peer !== conn.peer); + this.audioCalls = this.audioCalls.filter(c => c.peer !== conn.peer); + this.logMessage(`${conn.peer} lost connection.`); console.warn(`[Inc] Connection error ${conn.connectionId} with ${conn.peer}.`); }); }); diff --git a/views/index.ejs b/views/index.ejs index a0abe3d..1c44b10 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -79,7 +79,7 @@ -
+
Control
@@ -102,7 +102,7 @@ Disconnect
-
+