Temasys / SkylinkJS

SkylinkJS Javascript WebRTC SDK
http://skylink.io/web
Other
275 stars 57 forks source link

How do I check if a room if empty before joining? #377

Closed AmruthPillai closed 5 years ago

AmruthPillai commented 5 years ago

Pretty self explanatory question. Is there a way I can check the number of the peers already in a room before actually having to join that room?

iyharini commented 5 years ago

Hi AmruthPillai. For reasons of security, Skylink is designed to not allow this without actually joining the room. However, you may wish to consider joining the room with audio and video set to false and then use getPeersInRoom to count the connected peers in the room.