1
0
Fork 0
mirror of https://api.glitch.com/git/yaswvc synced 2026-01-12 03:48:10 +00:00

🌴🛩 Checkpoint

./public/main.js:5975361/1081
./views/index.ejs:5975361/129
This commit is contained in:
Glitch (peerjs-video) 2020-09-12 22:58:47 +00:00
parent 4c172250ce
commit ea2e8dc595
2 changed files with 13 additions and 2 deletions

View file

@ -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}.`);
});
});

View file

@ -79,7 +79,7 @@
</div>
</div>
<!-- control -->
<div class="col-6">
<div class="col-12 order-1 col-sm-6 order-sm-2">
<div class="card text-dark">
<div class="card-body">
<h5 class="card-title">Control</h5>
@ -102,7 +102,7 @@
Disconnect
</button>
<hr>
<div class="messages mt-1" style="min-height:30px;border:1px solid lightgrey;border-radius:.25rem;"></div>
<div class="messages mt-1" style="min-height:30px; max-height:100px;border:1px solid lightgrey;border-radius:.25rem;overflow: hidden scroll;"></div>
<br>
<div class="row">
<div class="col-12 col-sm-10">