my-audio-plugin
v0.0.31
Published
this is custom audio plugin to play audio
Downloads
54
Maintainers
Readme
my-audio-plugin
this is custom audio plugin to play audio
Install
npm install my-audio-plugin
npx cap sync
API
loadAudio(...)
loadAudio(options: { url: string; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------- |
| options
| { url: string; } |
play(...)
play(options: { url: string; }) => Promise<void>
| Param | Type |
| ------------- | ----------------------------- |
| options
| { url: string; } |
stop()
stop() => Promise<void>
release()
release() => Promise<void>
addListener('audioPlayCompleted', ...)
addListener(eventName: 'audioPlayCompleted', listenerFunc: (data: { status: string; }) => void) => Promise<PluginListenerHandle>
| Param | Type |
| ------------------ | --------------------------------------------------- |
| eventName
| 'audioPlayCompleted' |
| listenerFunc
| (data: { status: string; }) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |