Why Room Participants doesn't update instantly at the time of leave

Hello
when a user exit from the room we are calling room.exit(). so we get the signal from room.on('remoteParticipantExited', (participant) => { // Called when a remote participant has exited the room. console.log(participant); });

but on the API request, it doesn’t update instantly. can anybody tell why?

Also, if the same person joins another room, from the response of List of room API. we saw the same user is in 2 different rooms. that unusual.

Can anyone tell…

  1. how I can get a currently active user list in rooms
  2. when a user closes the browser is there any way to detect that he left?

Hi @Md_Alauddin_Al-Amin,

Please find the answer to your question below:

Q: Do API request update instantly?
Ans: API request does takes some time before the result is reflected.

Q: How I can get a currently active user list in rooms?
Ans: You can use group class and participate property to check how many users are active in the room. For more information please check the following link: Participants

Q: When a user closes the browser is there any way to detect that he left?
Ans: To detect users leaving the browser you can use BeforeUnloadlistner and confirm when user leaves the window. You can find more information regarding this here:beforeunload event

Pelase let us know if you have any other questions.

Best,
Dhaval.

we tried this before but we can not track unload when he closes the tab or browser.

Could you tell us how long does it take on average to be reflected in API response? because some of our actions are depending on that true result.

HI @Md_Alauddin_Al-Amin,

Can you please share some more information regarding the use-case for room exit API so that we can better assist you with it. Meanwhile, if you have any other questions, please let us know.

Best,
Dhaval.