Event handling zoom UIKit React

Before Creating a New Topic:

If you’re experiencing unexpected Video SDK behavior please search the forum with relevant keywords (e.x. error message) and follow the guidance outlined in those posts. Please also leverage the following support links:


Description
I am using Zoom UIKit to integrate Zoom video sessions into my application. I need to detect when a user joins or leaves the session.

Is there any built-in event listener or callback in Zoom UIKit that provides these events? If not, what would be the recommended approach to track user presence in the session?

Any guidance or sample code would be greatly appreciated.

Thanks!

Hi @gireesh.ks the UITookit has events for:

Event Listener Description
onSessionJoined Fires when the user joins the session successfully.
onSessionClosed Fires when a user leaves a session or it ends.
offSessionJoined Unsubscribes to the onSessionJoined event.
offSessionClosed Unsubscribes to the onSessionClosed event.

You can set up a listener for session join as:

const sessionJoined = () => {
  console.log("session joined");
};

uitoolkit.onSessionJoined(sessionJoined);

// clean up
uitoolkit.offSessionJoined(sessionJoined);

Same for onSessionClosed.

1 Like

Thank you for the response.
We have already implemented handlers for these events. However, when the browser’s back button is clicked, the session does not disconnect, and other participants can still see and hear the user. Similarly, when the browser is refreshed, the session isn’t properly handled, leading to unexpected behavior.

Could you please advise on how to properly manage session disconnection and cleanup during browser navigation (back/forward) or page refresh?

This topic was automatically closed 25 hours after the last reply. New replies are no longer allowed.