We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57c0b1a commit 53666c3Copy full SHA for 53666c3
1 file changed
simple-p2p-with-webrtc/index.js
@@ -15,7 +15,7 @@ navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(function
15
16
const players = {}
17
swarm.on('connect', function (peer, id) {
18
- if (!players[players]) {
+ if (!players[id]) {
19
players[id] = new Player()
20
peer.on('data', function (data) {
21
data = JSON.parse(data.toString())
0 commit comments