You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask for some help on retrieving the number of users in the room. I'm using the WebRTC tutorial here
There is a part where we call startWebRTC function based on the number of members in the room.
room.on('members', members => {
if (members.length >= 3) {
return alert('The room is full');
}
// If we are the second user to connect to the room we will be creating the offer
const isOfferer = members.length === 2;
startWebRTC(isOfferer);
startListentingToSignals();
});
I might have missunderstood the documentation, I thought this listener will retrieve every member in the room.
When I log out the room and the members variable provided by the listener I get these: room:
The members event provides the list of users who are connected at the time of connection. Use member_join and member_leave to catch any users joining or leaving.
It's hard to say what might have gone wrong in your situation. The room._events.members is an internal, I'm not sure that it contained a list of 5 users.
Hi!
I would like to ask for some help on retrieving the number of users in the room. I'm using the WebRTC tutorial here
There is a part where we call
startWebRTC
function based on the number of members in the room.I might have missunderstood the documentation, I thought this listener will retrieve every member in the room.
When I log out the room and the members variable provided by the listener I get these:
room:
As you can see here, there is 5 ppl in the room already, while the event listener will log this:
members array in the listener
Can you please help me out with this one? Is there any other way to retrieve the number of users in the room?
Also forgot to mention that I can see the connected members if I visit my scaledrone dashboard.
Thanks!
The text was updated successfully, but these errors were encountered: