Disable reload page on leave meeting

Hello, i can’t find solution to deny SDK scripts to reload page after client click “leave meeting” button,
there are “leaveUrl” required filed, but i don’t want to reload page, i just need to stay on the same page after leave/end meeting and destroy ZoomMtg to be able ZoomMtg .init() it again without page reloading.
I will be appreciated for any help…

Web Client JSSDK 1.5.0

Hi @osulzhenko,

As of right now the WebSDK is designed to reload the page after clicking leave meeting. We’ll talk with our Engineers to see if this type of feature can be look at in the future.

Thanks

1 Like

Hi @michael_p.zoom, thanks for quick response.
Can you tell me where i can get zoomus-jssdk.js not minified? maybe i can find place where reload triggered and change code to fit my requirements …

This issue is critical for my app, and i really need to find solution …

Hey @osulzhenko,

You can use a tool like https://unminify.com/ to convert it to not minified.

Thanks,
Tommy

It has no sense, there are all functions renamed, so it’s impossible to find out whats going on…
maybe you can ask developer for possible simple way to stop redirect on leave meeting ?

Hey @osulzhenko,

I do not recommend doing this, but to achive what you want, unminify the code here https://unminify.com/ then comment out these blocks of code:

case i.WS_CONF_LEAVE_REQ:
    n(Q()), n(U()), n({
        type: p.uc,
        data: []
    }), r.a.remove("wc_info", {
        path: "/"
    }), "jsapi" === o().meeting.joinSource ? o().meeting.leaveRedirect && !o().meeting.expelInfoModalIsOpen && (r.a.remove("wc_info", {
        path: "/"
    }), window.location.href = o().meeting.leaveUrl) : window.location.href = "".concat(o().meeting.baseUrl, "/wc/leave"), Object(A.I)(p.oc, {
        status: "disconnect"
    }), n({
        type: p.Gb,
        data: !0
    });
    break;
window.location.href = x
window.location.href = "".concat(b, "/wc/leave?meetingNumber=").concat(m)
window.location.href = c
window.location.href = "".concat(i, "/wc/leave?meetingNumber=").concat(s)

Then restart the server npm run start and when you leave a meeting the page will no longer refresh.

Code file reference here.

This may cause errors or issues when doing this, so again, I don’t recomend changing the source code. We will have a more customizable Web SDK coming next year, you can follow our release log in the meantime.

Thanks,
Tommy

hi tommy,
i don’t want to refresh page on meeting end because of data loss which is entered during call, how can i get this?

Hey @zsadiq, thanks for posting and using Zoom!

Unfortunately, there is no way to prevent the page reload for the leaveUrl at this time.

Can you explain “data loss” further so I can help come up with a solution?

Thanks,
Tommy

Hello

I am using zoom call player in a div and there is many other fields on same page so after meeting end page is reloads and all fields are empty

Thanks

Hey @zsadiq,

Can you add an auto save feature on your end to save the data every time it is edited?

Thanks,
Tommy

Thanks tommy

This is one of the solution, can I call my own function on meeting end?

Hey @zsadiq,

Checkout the inMeetingServiceListener it can detect when a user leaves / ends the meeting with onUserLeave.

https://zoom.github.io/sample-app-web/ZoomMtg.html#inMeetingServiceListener

Thanks,
Tommy

Hey Tommy

Thanks for your time, the whole conversation was very helpful.

1 Like

Happy to help!

Please let us know if you have additional questions! :slight_smile:

Thanks,
Tommy

Hi @tommy

I have tried what you have suggested ( Checkout the inMeetingServiceListener it can detect when a user leaves / ends the meeting with onUserLeave .) But it seems that it isn’t working. Then, in the documentation that you have provided, it’s written that the inMeetingServiceListener will be available in the sdk version 1.8.0. So they are not yet available, am I right?

Hi @uino,

Correct, version 1.8.0 is not available as of yet. Until we release it, a workaround to see when a user leaves a meeting or ends a meeting a workaround would be to use our Participant Leave[1] and Meeting End[2] webhooks.

1 - https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/participant-joined-meeting
2 - https://marketplace.zoom.us/docs/api-reference/webhook-reference/meeting-events/meeting-ending

Hi Tommy, mau u be a bit more accurate in how to use this webhook?

Thanks in advance

CS

Hey @Cristian,

Can you clarify your question? What Webhook are you referring to?

Thanks,
Tommy