Skip to content

AudioDeviceManager

Lejla Solak edited this page Jun 12, 2023 · 1 revision



audioDeviceEventListener

Description

Writable AudioDeviceEventListener property representing the current listener which will receive new audio device events.

Example

let infobipRTC: InfobipRTC = getInfobipRTCInstance()
if let call = infobipRTC.getActiveCall() {
    call.audioDeviceManager.audioDeviceEventListener = createAudioDeviceEventListener()
}



activeDevice

Description

Read-only AudioDevice property representing the currently used audio device. Can be nil during call initialization.

Example

let infobipRTC: InfobipRTC = getInfobipRTCInstance()
if let call = infobipRTC.getActiveCall() {
    let activeDevice = call.audioDeviceManager.activeDevice
}



availableAudioDevices

Description

Read-only [AudioDevice] property representing the list of currently available audio devices.

Example

let infobipRTC: InfobipRTC = getInfobipRTCInstance()
if let call = infobipRTC.getActiveCall() {
    let availableDevices = call.audioDeviceManager.availableAudioDevices
}



selectAudioDevice(_ audioDevice)

Description

Changes the currently active audio device to the specified audio device.

Arguments

  • audioDevice: AudioDevice - The audio device to be set as active.

Returns

  • N/A

Example

let infobipRTC: InfobipRTC = getInfobipRTCInstance()
if let call = infobipRTC.getActiveCall() {
    let availableDevices = call.audioDeviceManager.availableAudioDevices
    try call.audioDeviceManager.selectAudioDevice(availableDevices.first!)
}

Tutorials

Migration guides

Reference documentation

Clone this wiki locally