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