1.0.6 • Published 2 years ago
capacitor-plugin-mediaplayer
Mediaplayer plugin for Ionic Capacitor
Install
npm install capacitor-plugin-mediaplayer
npx cap sync
API
play(...)
play(options: { title: string; audio: string; cover: string; isPlaying: string; streaming: string; playbackPosition: string; duration: string; }) => void
Param | Type |
---|
options | { title: string; audio: string; cover: string; isPlaying: string; streaming: string; playbackPosition: string; duration: string; } |
pause()
pause() => void
resume()
resume() => void
seek(...)
seek(options: { seekTo: string; }) => void
Param | Type |
---|
options | { seekTo: string; } |
speed(...)
speed(options: { value: string; }) => void
Param | Type |
---|
options | { value: string; } |
stop()
stop() => void
current()
current() => Promise<{ state: string; position: string; duration: string; url: string; }>
Returns: Promise<{ state: string; position: string; duration: string; url: string; }>
addListener(string, ...)
addListener(event: string, callback: (info: any) => void) => PluginListenerHandle
Param | Type |
---|
event | string |
callback | (info: any) => void |
Returns: PluginListenerHandle
Interfaces
PluginListenerHandle
Prop | Type |
---|
remove | () => Promise<void> |