Auto start Audio on join session

According to the Zoom Video SDK Web documentation, it is mentioned that we should associate the startAudio function with a user button click. Here is an image showing the reference:

Is there any way to automatically start the audio when a user successfully joins the session? This functionality should work on all web browsers, mobile web browsers, and WebViews. Currently, we are already requiring user interaction through a button click to join the session, so it is guaranteed that the user has interacted with the web page before joining.

Which Web Video SDK version?
Web Video SDK: 1.7.7

Video SDK Code Snippets
Currently, using this code which will call on mic button click:

const onMicrophoneClick = useCallback(async () => {
		if (!isStartedAudio) {
			// await mediaStream?.startAudio({ speakerOnly: true });
			await mediaStream?.startAudio();
		if (isMuted) {
			await mediaStream?.unmuteAudio();
		} else {
			await mediaStream?.muteAudio();
	  }, [mediaStream, isStartedAudio, isMuted, userUnmutedAfterJoin]);
1 Like

Hey @arfa.ahmed

Thanks for your feedback.

We cannot get it to work on Safari. As you mentioned above, startAudio function needs to be invoked within the click event callback. It’s a limitation on Safari.


Thanks for your response. As mentioned earlier, in our web app, the user needs to click on a button to join the session, ensuring their interaction with the web page before joining. However, I’m seeking guidance on when and how to call the startAudio function in order to ensure compatibility across all web browsers. Unfortunately, I couldn’t find any specific method for this in your documentation or demo app. Could you please provide some recommendations or guidance on this matter?

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