Is there a way to enable removed user to reconnect or make user-removed event work faster when someone closes tab/app without leaving first


Format Your New Topic as Follows:

Video SDK Type and Version
web 1.10.8
Description
when someone closes his tab/browser/app before leaving the meeting, it takes roughly 2 minutes for user-removed event to work. Our application has a restriction of maximum 2 people in meeting, so we listen user-added and user-removed events to update current user count. But when someone closes browser directly, it takes 2 or more minutes for user-removed to work.
So we tried to user client.removeUser() as a workaround but when a user gets removed with this function, when he tries to reconnect, he gets error: 3009, Be Removed.

Is there a way to make user-removed work faster when someone unexpectedly disconnects, or let users reconnect after getting kicked with client.removeUser() ?

1 Like

Hey @kalparslantufek

Thanks for your feedback.

You can specify leaveOnPageUnload in the client.init method to ensure that when a user closes their tab, browser, or app, they will immediately leave the meeting.

Additionally, we provide an isInFailover attribute in the user payload, indicating whether the user has disconnected from the server (due to reasons such as network loss or closing the page).

Further explanation for 2 or more minutes wait:

When a user temporarily loses connection to the server due to a brief network issue, we don’t immediately remove them to enhance user experience. We have a heartbeat detection mechanism between the client and server, and only if the server doesn’t receive any heartbeat signals within 3 minutes will the user be removed.

Thanks
Vic

1 Like