Options
All
  • Public
  • Public/Protected
  • All
Menu

Start audio option interface.

Hierarchy

  • AudioOption

Index

Properties

autoStartAudioInSafari?: boolean

Start audio automatically in Safari.

In the Safari browser, when calling startAudio automatically or programmatically without any gesture (such as a click or touch on the document), the value of autoStartAudioInSafari should be true. Other than that, the value should always be false or unset.

Note: Use this option only if you are auto starting audio without a user click for Desktop Safari running macOS 15.2 to 16.0.

backgroundNoiseSuppression?: boolean

Suppress some kinds of background noise (e.g. dog barking,lawn mower,clapping, fans, pen tapping).

Note: Enabling this option may increase CPU utilization. It requires SharedArrayBuffer for WebAssembly audio, but not for WebRTC audio.

customAudioConstraints?: MediaTrackConstraints

Specifies custom audio constraints for the microphone.

  • When set, these constraints override other options such as microphoneId, backgroundNoiseSuppression, originalSound, etc.
  • Use this option only in specific scenarios. Normally, the SDK automatically optimizes the constraints.
  • This applies only to the current microphone. Switching microphones using stream.switchMicrophone will not carry over customAudioConstraints, as different microphones may have different capabilities.
  • Enabling backgroundNoiseSuppression or originalSound after setting this option will remove the custom constraints.
since

2.4.5

highBitrate?: boolean

128 kbps bitrate

mediaFile?: MediaPlaybackFile

Specify a media file as the audio input. It can be an audio file or a video file.

  • If you need to use a video file (mp4) for both video and audio input, make sure the URL is exactly the same and start video first.
microphoneId?: string

Microphone ID for the microphone capturing the audio, if not specified, use system default.

mute?: boolean

Join audio with microphone muted.

originalSound?: boolean | { hifi?: boolean; stereo?: boolean }

Support original sound

Note: originalsound and backgroundNoiseSuppression conflict with each other. If originalSound is enabled, backgroundNoiseSuppression will be disabled.

You can set the original sound for hifi, stereo, or both:

  • hifi: high fidelity audio
  • stereo: stereo audio
speakerId?: string

Audio speaker ID to play audio, if not specified, use system default.

speakerOnly?: boolean

Join audio only with the audio speaker, the microphone is not connected.

syncButtonsOnHeadset?: boolean

Sync mute or unmute state for the audio devices made by these manufactures: AVer, Crestron, Jabra, Logitech, Plantronics, Polycom, Shure, Yamaha, and Yealink.