Skip to main content

Function: useAudioSettings()

useAudioSettings(): object

This hook manages audio settings.

Returns

object

availableDevices

availableDevices: AudioOutputDevice[]

[Android only] available audio output devices to be set

selectAudioSessionMode()

selectAudioSessionMode: (audioSessionMode) => Promise<void>

[iOS only] selects audio session mode. For more information refer to Apple's documentation: https://developer.apple.com/documentation/avfaudio/avaudiosession/mode/

Parameters

ParameterType
audioSessionModeAudioSessionMode

Returns

Promise<void>

selectedAudioOutputDevice

selectedAudioOutputDevice: null | AudioOutputDevice

currently selected output audio device

selectOutputAudioDevice()

selectOutputAudioDevice: (device) => Promise<void>

[Android only] selects output audio device. For detecting and selecting bluettoth devices make sure you have the BLUETOOTH_CONNECT permission.

Parameters

ParameterType
deviceAudioOutputDeviceType

Returns

Promise<void>

showAudioRoutePicker()

showAudioRoutePicker: () => Promise<void>

[iOS only] Shows a picker modal that allows user to select output audio device. For more information refer to Apple's documentation: https://developer.apple.com/documentation/avkit/avroutepickerview

Returns

Promise<void>

Defined in

packages/react-native-client/src/hooks/useAudioSettings.ts:32