'I wanna to do stream with socket io and webRTC

I want the stream live to be unique and the user who has the url of this stream live can enter this stream live, but the users who don't have the url of the stream can't enter the stream live. My problem is when I start a stream live, the users who have the URL get in without any problem, but when I start another stream live, this stream breaks the users who watch the other stream live. I'm use socket io, webRTC, node.js and express.

This is my code server: enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source