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
-
+