Remove all event listener

Is there anyway to remove all the event listener on zoom video SDK?

Which Web Video SDK version?

My Code


Hi @superprokid .

Thank you for your post Are you looking for an event-listener for all users being removed? If so, we do not have one for all users leaving the session. Here is a full list of our available event-listeners.


You should be able to turn off event listeners using the off method -

I’m using it but it’s not working, am I using it wrong?

		removeZoomEvents() {'user-added');'user-removed');'user-updated');'video-dimension-change');'recording-change');'media-sdk-change');'auto-play-audio-failed');'active-speaker');'unmute-audio-consent');'audio-statistic-data-change');'device-change');'video-statistic-data-change');'peer-video-state-change');'video-active-change');'share-content-dimension-change');'peer-share-state-change');'connection-change');'main-session-user-updated');

Unfortunately, I can’t tell from that code snippet.

there is the second parameter “listener” in your code missing

on(event: “user-added”, listener: typeof event_user_add): void
off(event: “user-added”, listener: typeof event_user_add): void

for every listener you need, something like …

function listener_UserAdded( event ) {
    console.log( "userAdded:", event );

this.zoomClient.on('user-added', listener_UserAdded);'user-added', listener_UserAdded);

Thank you for catching that - completely missed it :slight_smile:

I’m using like this

this.zoomClient.on('share-content-dimension-change', async (payload) => {
// Mycode
});'share-content-dimension-change', () => {});

And it’s not removing the event, any reason why?

have you tried the syntax the separate event listener function?

quá pro the nay phai tang luong

The nen ga moi ko dc tang luong

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