AudioDeviceManager
Methods
callKitConfigureAudioSession
callKitConfigureAudioSession(): void
Required for the correct CallKit integration only. Otherwise don't use this method.Initialize AVAudioSession if the application uses CallKit.
Should be called when:
- the provider performs the specified start call action
- the provider performs the specified answer call action
Returns
type:
void
callKitReleaseAudioSession
callKitReleaseAudioSession(): void
Required for the correct CallKit integration only. Otherwise don't use this method.Restores default AVAudioSession initialization routines, MUST be called if CallKit becomes disabled.
Returns
type:
void
callKitStartAudio
callKitStartAudio(): void
Required for the correct CallKit integration only. Otherwise don't use this method.Starts AVAudioSession.
Should be called when:
- the provider’s audio session is activated
- the provider performs the specified set held call action
Returns
type:
void
callKitStopAudio
callKitStopAudio(): void
Required for the correct CallKit integration only. Otherwise don't use this method.Stops AVAudioSession.
Should be called when:
- the provider performs the specified end call action
- the provider performs the specified set held call action
Returns
type:
void
getActiveDevice
getActiveDevice(): Promise<AudioDevice>
Returns active audio device during the call or audio device that will be used for a call if there is no calls at this moment.
Returns
type:
Promise<AudioDevice>
getAudioDevices
getAudioDevices(): Promise<AudioDevice[]>
Returns the list of available audio devices.
Returns
type:
Promise<AudioDevice[]>
getInstance
getInstance():
Get AudioDeviceManager instance to control audio hardware settings
Returns
type:
off
off(eventType: , event: Function
): void
Remove a handler for the specified AudioDeviceManager event.
Parameters
eventType:
event:
Function
OptionalHandler function. If not specified, all handlers for the event will be removed.
Returns
type:
void
on
on(eventType: , event: Function
): void
Register a handler for the specified AudioDeviceManager event. One event can have more than one handler. Use the AudioDeviceManager.off method to delete a handler.
Parameters
eventType:
event:
Function
Returns
type:
void