Stream remote HLS and MP3 streams on iOS and Android.
npm install mp3-hls-streaming
npx cap sync
play(...)
pause()
resume()
seekTo(...)
stop()
setVolume(...)
setPlaybackRate(...)
setNowPlayingInfo(...)
addListener('error' | 'play' | 'pause' | 'stop' | 'timeUpdate' | 'buffering', ...)
removeAllListeners()
- Interfaces
- Type Aliases
play(options: { url: string; enableCommandCenter?: boolean; enableCommandCenterSeek?: boolean; }) => Promise<void>
Param | Type |
---|---|
options |
{ url: string; enableCommandCenter?: boolean; enableCommandCenterSeek?: boolean; } |
pause() => Promise<void>
resume() => Promise<void>
seekTo(options: { position: number; }) => Promise<void>
Param | Type |
---|---|
options |
{ position: number; } |
stop() => Promise<void>
setVolume(options: { volume: number; }) => Promise<void>
Param | Type |
---|---|
options |
{ volume: number; } |
setPlaybackRate(options: { rate: number; }) => Promise<void>
Param | Type |
---|---|
options |
{ rate: number; } |
setNowPlayingInfo(options: { title: string; artist: string; album: string; duration: string; imageUrl: string; isLiveStream: boolean; }) => Promise<void>
Param | Type |
---|---|
options |
{ title: string; artist: string; album: string; duration: string; imageUrl: string; isLiveStream: boolean; } |
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