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