muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.54k stars 1.38k forks source link

Problem. Viewers see the broadcasters from other rooms. How to fix it? #589

Open ghost opened 6 years ago

ghost commented 6 years ago

In the Demo Multi-Broadcasters-and-Many-Viewers.html

  1. Initiator A opens room №1.

  2. Broadcasters B, C join room №1.

  3. Viewers receive a link to the link to see the initiator and the broadcasters in the room number 1: A, B, C.

  4. Second Initiator AA opens room №2.

  5. Broadcasters AB, AC join room №2.

  6. Viewers see the first initiator A and the Broadcasters B and C from room №1 and Broadcasters AB and AC from room №2, ie: A, B, C, AB, AC.

Is this a bug? How to make Viewers receive video/audio streams only from those who are in the room that they chose?

ghost commented 6 years ago

If you change these values, then viewers from room number 1 do not see the broadcast patches from other rooms. Is this the correct solution?

in file Multi-Broadcasters-and-Many-Viewers.html change values fore:
var connection = new RTCMultiConnection('test2'); and connection.socketMessageEvent = 'multi-broadcasters-demo-test2';

avspeed commented 6 years ago

as long as your users are in separate channels they will not see/hear each other.

https://www.rtcmulticonnection.org/docs/channel-id/

ghost commented 6 years ago

Thanks for the advice. It really works )

ghost commented 6 years ago

And why should I use connection.socketMessageEvent ? Does it also need to be changed if the connection.channel changes?

ghost commented 6 years ago

And a few more questions, if you please.

  1. That participants did not see each other in a chat room with the same name, I changed the connection.channel.
  2. In Channel №1 broadcaster1 opened Room A
  3. But in Channel №2 another broadcaster2 can not create a chat room with the name A.

When checking whether a chat room is open on the server, does it not take into account that it can be created in different channels? Or is this restriction?