leaveUrl on Component View

Hi there,

I need to refresh the page once the user leaves the meeting, i can’t find a way to do that using component view.

Using client view i could either use leaveUrl to do that automatically, or use inMeetingServiceListener to capture events like onUserLeave and refresh the page.

appreciate any help.

@matheuspiffer Thanks for mentioning this. We don’t have support for in meeting events when it comes to the component view but our engineering team is working hard to bring this in a future relase.

Clarifying here: The “leave meeting” functionality seems broken in Component View. Do we need to implement our own exit of the meeting?

Hey @clayweb , @matheuspiffer ,

It is by design. There is no “page refresh” in Component View after a meeting is left or ended. Unlike Client View, we leave that up to you, the developer.

We empower you by giving you the leaveMeeting function and Meeting Left Webhook so you can implement the flow of your choice. :slight_smile:

Component View works especially well with SPAs (Angular, React, Vue, etc) because leaving or ending a meeting /webinar does not trigger a full page refresh.

Thanks,
Tommy

Hello tommy,

How can i customize leaveMeeting function, I prefer to add some more snippets which does some other cleanups required

can i pass it as a parameter during client.init ?

if yes it will be helpful if u can gimme a reference
i dont see that in API reference

only embeddedclient.leavemeeting is explained

Hi, @Zerodistance,

Thank you for your question. Can you share more details about the snippets and other cleanups you’d like to add? This will help determine if it is possible or if there is an alternative solution you can consider.

Thanks,
Donte

Hello @donte.zoom

I would like to perform the following when end meeting or leave meeting triggers
1)clear session storage
2)make a firebase call to delete some data
3)refresh the page/redirect to sign-in page
4)if possible id like to add an alert message asking are you sure you want to leave this meeting

currently, I have added an extra leave meeting button via customize toolbar
and I’m using client.leaveMeeting snippet along with my cleanup code to perform leave meeting manually
however it would be great if I can perform that by the click of the leave button zoom UI displays

image
I have added the way I’m handling this issue now

@donte.zoom can you please help me with this

Hi, @Zerodistance,

Currently, we don’t support that level of customization on the leave button Zoom UI displays. You want to use the Custom Button to implement your own experience. The custom button allows developers to build custom experiences tailored to their application functionality. For this use case, the custom button is the way to go!

@donte.zoom

As per your suggestion, I’ve been using client.leaveMeeting() and client.endMeeting() function using a custom button to close meeting
However, I’m getting the following error when close is endMeeting of leaveMeeting is Executed

can you please help me with what is going wrong here
here’s the declaration for Custom Button:

@donte.zoom

continuing the discussion
whenever i end a meeting and try to join another


following error pops up

our use case for zoom here is
1)multiple 1-on-1 meetings
2)webinars too
here user can attend meetings one after other and join webinar

so when im testing this case
i join a meeting end it then when i try to join another meeting
i get this error

can u help me with this too

Based on the error, it looks like another action is being executed when the meeting is in a closing state. Can you share the exact actions made when that error occurs? Perhaps you could implement asynchronous logic to properly manage your application’s flow.

Hello @donte.zoom

Zoom SDK version :2.3.5

Steps to reproduce
1)run the following code to join meeting

code :-

	const beginJoin = useCallback(
		(signature) => {
			client
				.init({
					debug: true,
					zoomAppRoot: meetingSDKElement,
					language: "en-US",
					customize: {
						ribbon: {
							isResizable: false,
						},
						video: {
							isResizable: false,
							popper: {
								placement: "bottom",
								disableDraggable: true,
							},
						},
						toolbar: {
							buttons: [
								{
									text: "Polls",
									className: "Polls_ui",
									onClick: () => {
										handlePoll(parseInt(role) === 1 ? "Mod" : "Reg");
									},
								},
								{
									text: Role ? "End Meeting" : "Leave Meeting",
									className: "end-meeting-li",
									onClick: () => {
										yesNoAlert("Are You Sure?", `Do you want to ${Role ? "End Meeting" : "Leave Meeting"}?`, "").then((result) => {
											if (result.isConfirmed) {
												if (Role) {
													client.endMeeting();
												} else {
													client.leaveMeeting();
												}

												endZoomMeeting();
											}
										});
									},
								},
							],
						},
					},
				})
				.then((e) => {
					console.log("success", e);
					client
						.join({
							apiKey: process.env.REACT_APP_ZOOM_API_KEY,
							signature: signature, // role in signature needs to be 0
							meetingNumber: meetingnumber,
							password: password,
							userName: name,
							userEmail: userEmail, // userEmail property required
						})
						.then((e) => {
							console.log("success", e);
							 setAudioTutorial(true);
							
						})
						.catch((e) => {
							if (parseInt(e.errorCode) === 3008) {
								yesNoAlert("Host has not Joined Yet", "", "", "Wait", "Refresh page").then((result) => {
									if (result.isConfirmed) {
									} else {
										window.location.reload();
									}
								});
							}
						});
				})
				.catch((e) => {
					console.log("error", e);
					confirmationAlert("Meeting Initialization Failed", "", "", "", "Exit").then((result) => {
						endZoomMeeting();
					});
				});
		},
		[meetingID]
	);

After the meeting is started , i end the meeting with
my custom leave button
and following error shows up

this issue halts our whole going into production process
i hope u can help me with a solution as sooon as possible @donte.zoom

thanks

Any updates on this, nothing i try is working on this issue ,

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

@Zerodistance,

Sorry for the missed response, we recently introduced a destroy client API, can you try to leverage that API and let us know if it resolves the behavior you are seeing?

Here is the developer forum post with more information on this matter :