The LocalAudio model allows enabling and disabling the local participant's audio as well as setting and checking the capture mode and comfort noise level.
This model is supported only in SDK 3.7 and later.
constraints: MediaTrackConstraints): Promise
Applies a set of audio constraints to an audio track to allow setting ideal values and acceptable value ranges of constrainable properties of the track, such as echo cancellation and noise suppression. The method does not allow setting the deviceId and groupId constraints. If the required constraints are too strict to find a match during a track configuration attempt, the promise is rejected with the OverconstrainedError. We recommend using this method for applying constraints; MediaStreamTrack.applyconstraints() may not work as expected.
The method is available only for users who use the Opus codec. Calling this method by listeners or participants who use the Dolby Voice Codec triggers the UnsupportedError. Calling the method outside of a conference or when the local audio track is not started causes a rejection of a promise and an error.
The method may require a few seconds to become effective because some constraints of an audio track must be recreated.
▸ getCaptureMode(): Promise<AudioCaptureModeOptions>
Returns the local participant's audio capture mode in Dolby Voice conferences.
options: AudioCaptureModeOptions): Promise<void>
Sets the local participant's audio capture mode in Dolby Voice conferences.
|AudioCaptureModeOptions||The preferred audio capture mode and additional settings for the selected mode.|
▸ getComfortNoiseLevel(): Promise<ComfortNoiseLevel>
Returns the comfort noise level setting for output devices in Dolby Voice conferences.
level: ComfortNoiseLevel): Promise<void>
Sets the comfort noise level for output devices in Dolby Voice conferences.
|ComfortNoiseLevel||The comfort noise level.|
▸ start(): Promise<any>
Enables the local participant's audio and sends the audio to a conference. This method is not available for listeners and triggers the UnsupportedError.
The SDK automatically manages audio rendering, which means that the application does not need to implement its own element. The application can use the selectAudioInput and selectAudioOutput methods to select the proper audio input and output devices.
The start method requires a few seconds to become effective.
▸ stop(): Promise<any>
Disables the local participant's audio and stops sending the audio to a conference. This method is not available for listeners and triggers the UnsupportedError.
The stop method requires a few seconds to become effective.
Updated 5 days ago