AudioDeviceManager
Methods
callKitConfigureAudioSession
callKitConfigureAudioSession(): void
Initializes AVAudioSession if the application uses CallKit.Required for the correct CallKit integration only. Otherwise do not use this method.
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
Restores the default AVAudioSession initialization routines, MUST be called if CallKit becomes disabled.Required for the correct CallKit integration only. Otherwise do not use this method.
Returns
type:
void
callKitStartAudio
callKitStartAudio(): void
Starts AVAudioSession.Required for the correct CallKit integration only. Otherwise do not use this method.
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
Stops AVAudioSession.Required for the correct CallKit integration only. Otherwise do not use this method.
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 the active audio device during a call or the audio device that is to 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():
Gets an AudioDeviceManager instance to control audio hardware settings.
Returns
type:
off
off(eventType: , event: Function
): void
Removes a handler for the specified AudioDeviceManager event.
Parameters
eventType:
event:
Function
OptionalHandler function. If not specified, all handlers for the event are removed.
Returns
type:
void
on
on(eventType: , event: Function
): void
Registers 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