Description
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();
setIsStartedAudio(true);
}
if (isMuted) {
await mediaStream?.unmuteAudio();
setIsMuted(false);
} else {
await mediaStream?.muteAudio();
setIsMuted(true);
}
}, [mediaStream, isStartedAudio, isMuted, userUnmutedAfterJoin]);