From 684e163d96fa6e4f8d62625a49c19a38c7aa705f Mon Sep 17 00:00:00 2001 From: "Glitch (peerjs-video)" Date: Wed, 9 Sep 2020 08:16:22 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=84=F0=9F=91=B8=20Checkpoint=20./publi?= =?UTF-8?q?c/index.html:5975361/6=20./public/main.js:5975361/296?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- public/main.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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);