WebDevSimplified / Zoom-Clone-With-WebRTC

1.52k stars 865 forks source link

Node server crashes whenever I have more than one browser window open. #55

Closed brendanreape88 closed 3 years ago

brendanreape88 commented 3 years ago

I've followed the tutorial exactly and am able to see my video with one browser window open. However, for some reason my node server crashes when I open up another browser window with the same localhost address as the original browser to simulate multiple users being in one room together.

Has anyone gotten these same errors and found a way to resolve them?

Screen Shot 2021-03-11 at 8 12 06 PM Screen Shot 2021-03-11 at 8 12 38 PM
keithlim commented 3 years ago

replace socket.to(roomId).broadcast.emit('user-connected', userId) to socket.broadcast.to(roomId).emit('user-connected', userId)