0.0.3 • Published 4 months ago

capacitor-audio-focus v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

capacitor-audio-focus

Android capacitor AudioFocus.

Install

npm install capacitor-audio-focus
npx cap sync

API

requestFocus()

requestFocus() => Promise<void>

abandonFocus()

abandonFocus() => Promise<void>

addListener('audioFocusChangeEvent', ...)

addListener(eventName: 'audioFocusChangeEvent', listenerFunc: (obj: { type: 'AUDIOFOCUS_GAIN' | 'AUDIOFOCUS_LOSS' | 'AUDIOFOCUS_LOSS_TRANSIENT' | 'AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK'; }) => void) => Promise<PluginListenerHandle>
ParamType
eventName'audioFocusChangeEvent'
listenerFunc(obj: { type: 'AUDIOFOCUS_GAIN' | 'AUDIOFOCUS_LOSS' | 'AUDIOFOCUS_LOSS_TRANSIENT' | 'AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK'; }) => void

Returns: Promise<PluginListenerHandle>


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>
0.0.3

4 months ago

0.0.2

7 months ago

0.0.1

2 years ago