mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 03:18:10 +00:00
🐿😘 Checkpoint
./public/index.html:5975361/109 ./public/main.js:5975361/275
This commit is contained in:
parent
ed5abf84bc
commit
9daa3a4950
2 changed files with 12 additions and 4 deletions
|
|
@ -94,13 +94,13 @@
|
|||
</button>
|
||||
<hr>
|
||||
<div class="messages mt-1" style="min-height:30px;border:1px solid lightgrey;border-radius:.25rem;"></div>
|
||||
<hr>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-10">
|
||||
<input type="text" class="form-control">
|
||||
<input type="text" v-model="chatInput" class="form-control">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="btn btn-primary float-right">
|
||||
<div class="col-12 col-sm-2">
|
||||
<div class="btn btn-primary float-right" v-on:click="sendMessage()">
|
||||
Send
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ var app = new Vue({
|
|||
stream: null,
|
||||
calls: [],
|
||||
connections: [],
|
||||
chatInput: '',
|
||||
},
|
||||
methods: {
|
||||
logMessage: function(message) {
|
||||
|
|
@ -81,12 +82,19 @@ var app = new Vue({
|
|||
},
|
||||
hangUp: function() {
|
||||
this.calls.forEach(c => {
|
||||
console.log('hangUp - closing', c);
|
||||
c.close();
|
||||
});
|
||||
this.connections.forEach(c => {
|
||||
console.log('hangUp - closing', c);
|
||||
c.close();
|
||||
});
|
||||
},
|
||||
sendMessage: function(text = this.chatInput) {
|
||||
this.connections.forEach(c => {
|
||||
c.send(text);
|
||||
});
|
||||
},
|
||||
listenForPeerEvents: function () {
|
||||
this.peer.on('open', (id) => {
|
||||
localStorage.setItem('yaswvc-peerId', id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue