Thank you for reaching out to the Zoom Developer Forum. First, make sure that when you are attempting to join the meeting you change the role you’re using to 1 and regenerate your signature.
If you would like to leave a meeting when you refresh the page, the best option is to add an event listener to the unload or beforeUnload events. Within your event listener, you can try calling the ZoomMtg.leaveMeeting() function.
I hope that helps! Let me know if you have any questions.
Hi Max. Yes I am using role 1 when refresh. And since I am using role 1, I got a new meeting id with new sig, and it kept showing the error that I cannot join a new meeting.
Regard to the unload event, I’ll try that and see how it works.