@dialstack/sdk-dev / native/src / AudioOutputController
Interface: AudioOutputController
Defined in: sdk/native/src/audioOutput.ts:21
Call-audio routing, implemented by a host that owns call audio
(callAudio="host") over whatever its OS integration exposes.
current() must be what the OS reports, never what was last requested: the
route also changes from the CallKit/Telecom UI, a headset, or a car, and the
softphone shows only this. It must return the same object until the route
changes.
Methods
current()
TypeScript
current(): AudioOutput | null;
Defined in: sdk/native/src/audioOutput.ts:22
Returns
AudioOutput | null
onChange()
TypeScript
onChange(listener): () => void;
Defined in: sdk/native/src/audioOutput.ts:23
Parameters
listener
(output) => void
Returns
() => void
setSpeaker()
TypeScript
setSpeaker(on): Promise<void>;
Defined in: sdk/native/src/audioOutput.ts:24
Parameters
on
boolean
Returns
Promise<void>