Leave Room

Once you're done with the meeting and want to exit, call leave on the HMSSDK instance you created to join the room.

Before calling leave, remove the previously added Event Listeners (HMSUpdateListenerActions) as -

// Removing all registered event listeners hmsInstance.removeAllListeners();

To leave the meeting, call the leave method of HMSSDK instance. leave method returns promise which is resolved upon completion of leave process.

try { await hmsInstance.leave(); console.log('Leave Success'); } catch (error) { console.log('Leave Error: ', error); }

After leaving the meeting, you can free your apps' resources, check out Release Resources Docs


Have a suggestion? Recommend changes ->

Was this helpful?

1234