Audio

Session hosts can manage their own audio as well as the audio of other users in the session.

The following sections show some examples of audio controls.

Check audio connection

Before implementing audio controls, you must first check if the user is connected to audio by getting the user's ZoomVideoSDKAudioType.

user.audioStatus.isMuted(); // Check if the user is muted
user.audioStatus.isTalking(); // Check if the user is talking
user.audioStatus.getAudioType(); // Check if the user is connected

Start audio

If the user is not connected, you can connect to the audio using the audioHelper.

zoom.audioHelper.startAudio();

Mute or unmute audio

Once connected, you can mute and unmute a user's audio by calling muteAudio or unmuteAudio:

zoom.audioHelper.muteAudio(userId);
zoom.audioHelper.unmuteAudio(userId);

Disconnect from audio

To disconnect completely from audio, use stopAudio:

zoom.audioHelper.stopAudio();

Sound options

By default, Zoom uses noise suppression and echo cancellation to improve the quality of the audio received by your microphone, but these audio filters can interfere with situations that require capturing the full range of audio. See Configuring professional audio settings for Zoom Meetings for details.

Video SDK uses the same technology to improve audio quality, but also supports the ability to turn off these filters to capture the original sound of the microphone, for example, to support the use of a high-quality microphone with built-in audio filters or to capture the full audio range without noise suppression. Capturing the microphone's original sound disables the background noise suppression feature.

Original sound

To enable original sound, set enableMicOriginalInput to true in the ZoomVideoSdkAudioSettingHelper class. The default setting is false.

const zoom = useZoom();
await zoom.audioSettingHelper.enableMicOriginalInput(true);

To disable, set enableMicOriginalInput to false.

await zoom.audioSettingHelper.enableMicOriginalInput(false);