Debugging Web SDK: Problem when page reload and rerun init() then errorCode: 3008?

Hi all

  • I am currently doing a developement using Zoom Web SDK with Zoom sample web app, like this:
ZoomMtg.init({
    ...
    success: function(res){
        ZoomMtg.join({...})
    },
    error: function(res){...},
});
  • Since I am doing development, I need to refresh the page a few times

  • Which means, the Zoom meetingNumber is different each time after refresh

  • Here is the scenario: When the page first load, I can create, init and join a meeting as host,

  • When I refresh again, I got an error 3008 Please join meeting first!, which is normal as I am being seen as doing concurrent meeting

  • Now here is my question:

    • How do I “kick myself out” / “leave” in my last meeting so that I can join the newly created one, when I am hitting “F5” to refresh a page?

Thank you very much in advance

Hey @alucard001,

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.

Thanks,
Max

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.

Thank you.

Hi Max

The problem is fixed now. Thank you. I use beforeunload to do leaveMeeting().

Hey @alucard001,

I’m glad to hear that resolved your issue! Please don’t hesitate to reach out if you encounter any further issues or questions.

Thanks,
Max

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