From 9daa3a4950cdd3854a76312ad4c6ddf9587da4a5 Mon Sep 17 00:00:00 2001 From: "Glitch (peerjs-video)" Date: Thu, 10 Sep 2020 21:19:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=BF=F0=9F=98=98=20Checkpoint=20./publi?= =?UTF-8?q?c/index.html:5975361/109=20./public/main.js:5975361/275?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 8 ++++---- public/main.js | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 240f168..cf1fa21 100644 --- a/public/index.html +++ b/public/index.html @@ -94,13 +94,13 @@
-
+
- +
-
-
+
+
Send
diff --git a/public/main.js b/public/main.js index 41f83cd..d904e57 100644 --- a/public/main.js +++ b/public/main.js @@ -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);