mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 05:08:11 +00:00
🍜⏰ Checkpoint
./views/index.ejs:5975361/4290 ./public/main.js:5975361/648
This commit is contained in:
parent
69eda41a55
commit
4c172250ce
2 changed files with 40 additions and 6 deletions
|
|
@ -112,6 +112,14 @@ var app = new Vue({
|
||||||
console.log('hangUp - closing', c);
|
console.log('hangUp - closing', c);
|
||||||
c.close();
|
c.close();
|
||||||
});
|
});
|
||||||
|
this.audioCalls.forEach(c => {
|
||||||
|
console.log('hangUp - closing', c);
|
||||||
|
c.close();
|
||||||
|
});
|
||||||
|
this.videoCalls.forEach(c => {
|
||||||
|
console.log('hangUp - closing', c);
|
||||||
|
c.close();
|
||||||
|
});
|
||||||
this.connections.forEach(c => {
|
this.connections.forEach(c => {
|
||||||
console.log('hangUp - closing', c);
|
console.log('hangUp - closing', c);
|
||||||
c.close();
|
c.close();
|
||||||
|
|
|
||||||
|
|
@ -92,13 +92,13 @@
|
||||||
<hr>
|
<hr>
|
||||||
<input type="text" ref="connectPeer" class="form-control" placeholder="paste-peer-id-here">
|
<input type="text" ref="connectPeer" class="form-control" placeholder="paste-peer-id-here">
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-sm btn-success" v-on:click="connectToPeer($refs.connectPeer.value);$refs.connectPeer.value = '';">
|
<button class="btn btn-sm btn-success mt-1" v-on:click="connectToPeer($refs.connectPeer.value);$refs.connectPeer.value = '';">
|
||||||
Connect
|
Connect
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-sm btn-primary" v-on:click="connectToPeer2($refs.connectPeer.value);$refs.connectPeer.value = '';">
|
<button class="btn btn-sm btn-primary mt-1" v-on:click="connectToPeer2($refs.connectPeer.value);$refs.connectPeer.value = '';">
|
||||||
Connect 2
|
Connect 2
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-sm btn-danger" v-on:click="hangUp()">
|
<button class="btn btn-sm btn-danger mt-1" v-on:click="hangUp()">
|
||||||
Disconnect
|
Disconnect
|
||||||
</button>
|
</button>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
@ -120,6 +120,33 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- peers -->
|
<!-- peers -->
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
|
<!-- audio calls -->
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="card text-dark">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Audio connections</h5>
|
||||||
|
<p v-for="call in audioCalls">
|
||||||
|
{{ call.peer}}
|
||||||
|
<audio v-if="call._localStream.getAudioTracks().length > 0" v-bind:id="'video-'+call.connectionId" class="card-img-top" controls autoplay></audio>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- video calls -->
|
||||||
|
<div v-for="call in videoCalls" class="col-6">
|
||||||
|
<div class="card text-dark">
|
||||||
|
<video v-if="call._localStream.getVideoTracks().length > 0" v-bind:id="'video-'+call.connectionId" class="card-img-top" autoplay muted></video>
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">Video: {{call.peer}}</h5>
|
||||||
|
<p>
|
||||||
|
Video: {{ call._localStream.getVideoTracks().length }}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Audio: {{ call._localStream.getAudioTracks().length }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- calls -->
|
<!-- calls -->
|
||||||
<div v-for="call in calls" class="col-6">
|
<div v-for="call in calls" class="col-6">
|
||||||
<div class="card text-dark">
|
<div class="card text-dark">
|
||||||
|
|
@ -136,8 +163,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- audio calls -->
|
<!-- end -->
|
||||||
<!-- video calls -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue