Stream remote HLS and MP3 streams on iOS and Android.
npm install mp3-hls-streaming
npx cap sync
play(...)
pause()
resume()
seekTo(...)
stop()
setPlaybackRate(...)
addListener('error' | 'play' | 'pause' | 'stop' | 'timeUpdate' | 'buffering', ...)
removeAllListeners()
- Interfaces
- Type Aliases
play(options: { url: string; }) => Promise<void>
Param | Type |
---|---|
options |
{ url: string; } |
pause() => Promise<void>
resume() => Promise<void>
seekTo(options: { position: number; }) => Promise<void>
Param | Type |
---|---|
options |
{ position: number; } |
stop() => Promise<void>
setPlaybackRate(options: { rate: number; }) => Promise<void>
Param | Type |
---|---|
options |
{ rate: number; } |
addListener(eventName: 'play' | 'pause' | 'stop' | 'timeUpdate' | 'buffering' | 'error', listenerFunc: (data: RemoteStreamerEventData) => void) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName |
'error' | 'play' | 'pause' | 'stop' | 'timeUpdate' | 'buffering' |
listenerFunc |
(data: RemoteStreamerEventData) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners() => Promise<void>
Prop | Type |
---|---|
remove |
() => Promise<void> |
Prop | Type |
---|---|
type |
'play' |
Prop | Type |
---|---|
type |
'pause' |
Prop | Type |
---|---|
type |
'stop' |
Prop | Type |
---|---|
type |
'timeUpdate' |
currentTime |
number |
Prop | Type |
---|---|
type |
'buffering' |
isBuffering |
boolean |
Prop | Type |
---|---|
type |
'error' |
message |
string |
PlayEvent | PauseEvent | StopEvent | TimeUpdateEvent | BufferingEvent | ErrorEvent