diff --git a/public/index.html b/public/index.html index da8967e..b32003c 100644 --- a/public/index.html +++ b/public/index.html @@ -49,7 +49,7 @@
- +
It'se me! diff --git a/public/main.js b/public/main.js index 9ade8a7..7607500 100644 --- a/public/main.js +++ b/public/main.js @@ -22,6 +22,10 @@ var app = new Vue({ document.querySelector(selector).srcObject = stream; }, connectToPeer: function(peerId) { + if (peerId === this.peer.id) { + this.logMessage(`You played yourself! Can't connect to yourself.`); + return; + }; this.logMessage(`Connecting to ${peerId}...`); let conn = this.peer.connect(peerId);