LocalAudio
The LocalAudio model allows managing the local participant's audio settings.
This model is supported only in SDK 3.7 and later.
Available in the package com.voxeet.sdk.services.audio.LocalAudio.
Methods
registerLocalInputAudioCallback
▸ registerLocalInputAudioCallback(callback
: LocalInputAudioCallback): void
Registers a callback that allows getting the local audio input. The method allows accessing the local participant's audio stream before sending the stream through an open session. You may use it to build speech recognition or audio moderation. Pre-processing audio is currently not supported. For more information, see the Accessing the Local Audio Stream guide.
The method is supported in SDK 3.8 and later.
Parameters
Name | Type | Description |
---|---|---|
callback | LocalInputAudioCallback | The callback to register. |
unregisterLocalInputAudioCallback
▸ unregisterLocalInputAudioCallback(callback
: LocalInputAudioCallback): void
Unregisters a callback that allows getting the local audio input. The method is supported in SDK 3.8 and later.
Parameters
Name | Type | Description |
---|---|---|
callback | LocalInputAudioCallback | The callback to unregister. |
setCaptureMode
▸ setCaptureMode(@NonNull audioCaptureMode
: AudioCaptureMode): void
Sets the local participant's audio capture mode in Dolby Voice conferences.
Parameters
Name | Type | Description |
---|---|---|
audioCaptureMode | AudioCaptureMode | non null |
getCaptureMode
▸ getCaptureMode(): AudioCaptureMode
Gets the local participant's audio capture mode in Dolby Voice conferences.
Returns: @NonNull AudioCaptureMode
start
▸ start(): Promise<Boolean>
Starts sending the local participant’s audio streams from the local client to the conference. This method is not available for listeners in Dolby Voice conferences.
The method requires up to a few seconds to become effective.
Returns: @NonNull Promise<Boolean>
stop
▸ stop(): Promise<Boolean>
Stops sending local participant’s audio from the local client to the conference. This method is not available for listeners in Dolby Voice conferences.
The method requires up to a few seconds to become effective.
Returns: @NonNull Promise<Boolean>
getSoundManager
▸ getSoundManager(): SoundManager
Gets the SoundManager instance.
Returns: @NonNull SoundManager
registerUpdateDevices
▸ registerUpdateDevices(callback
: SoundManager.Call<List>): boolean
Registers external listeners to update the MediaDevice platform.
Parameters
Name | Type | Description |
---|---|---|
callback | SoundManager.Call<List> | The callback to register. |
Returns: boolean - Information whether the registered call is successful.
unregisterUpdateDevices
▸ unregisterUpdateDevices(callback
: SoundManager.Call<List>): void
Unregisters external listeners to update the MediaDevice platform.
Parameters
Name | Type | Description |
---|---|---|
callback | SoundManager.Call<List> | The callback to unregister. |
enumerateDevices
▸ enumerateDevices(): Promise<List>
Enumerates all connected audio devices that are available for the local participant.
Returns: @NonNull Promise<List> - The promise to resolve.
connect
▸ connect(@NonNull device
: MediaDevice): Promise<Boolean>
Connects a specific device to the SDK.
Parameters
Name | Type | Description |
---|---|---|
device | MediaDevice | non null The device to connect. |
Returns: @NonNull Promise<Boolean> - The promise to resolve.
disconnect
▸ disconnect(@NonNull device
: MediaDevice): Promise<Boolean>
Disconnect a specific device from the SDK.
Parameters
Name | Type | Description |
---|---|---|
device | MediaDevice | non null The device to disconnect. |
Returns: @NonNull Promise<Boolean> - The promise to resolve.
setDefaultSpeakerMode
▸ setDefaultSpeakerMode(isSpeaker
: boolean): void
Sets the default speaker mode.
Parameters
Name | Type | Description |
---|---|---|
isSpeaker | boolean | The default value of the speaker mode. |
isDefaultSpeakerMode
▸ isDefaultSpeakerMode(): boolean
Checks if the default mode when entering the conference will be using the external speaker.
Returns: boolean - gives the expected audio device used in case of internal / external speaker only
currentMediaDevice
▸ currentMediaDevice(): Promise<MediaDevice>
Gets a media device that is currently connected.
Returns: @NonNull Promise<MediaDevice> - The promise to resolve.
Updated 17 days ago