Best practices

These recommendations help you ship a reliable audio experience with the Video SDK for Linux.

Select the right audio devices

On Linux, the SDK captures and plays back through the system audio devices exposed by ALSA or PulseAudio. On machines with more than one device, don't assume the default is correct.

  • Enumerate devices with getMicList and getSpeakerList and let the user choose, or select a known device by ID. For details, see Select a microphone or speaker.
  • Confirm at least one capture device is present before calling startAudio. A headless host with no sound server configured has no devices to select.

Enable audio with a clear action

If your app has a user interface, tie the call to startAudio to a visible, user-initiated action like a "Join audio" or microphone button. This makes it easy for users to understand when they're connected to session audio.

Show mute and talking status

  • Render each user's mute state from their ZoomVideoSDKAudioStatus so participants can see at a glance who is muted. Implement onUserAudioStatusChanged and re-render when it fires.
  • Drive a talking indicator from the onUserActiveAudioChanged callback together with the isTalking field. This gives users confirmation that their mic is capturing their voice.

Headless and server deployments

Many Linux Video SDK apps run headless, for example a bot or recorder deployed to a cloud host.

  • If the host has no physical audio hardware, configure a virtual sound device (such as a PulseAudio null sink) so the SDK has a device to open, or work entirely through raw audio instead of system devices.
  • To inject your own audio into the session without a capture device, provide a virtual audio source rather than calling startAudio against hardware. For details, see Send raw data.
  • To consume session audio for transcription or recording, subscribe to raw audio rather than routing it to a speaker.

Sound options

Leave original sound disabled unless your use case specifically needs unprocessed audio. The SDK's default audio processing (echo cancellation, noise suppression) produces a better experience for general voice communication. Enable original sound for music, broadcasting, or other content where the SDK's processing would degrade the source.

Handle host-ask-unmute on the client

When the host calls unMuteAudio on a remote user, the target device receives onHostAskUnmute. Always show the user a confirmation prompt; never silently turn on their microphone. Calling unMuteAudio on the local user without the user's explicit acknowledgment violates the user's expectation of mic privacy.