Skip to content

patrickjquinn/capacitor-remote-streamer

Repository files navigation

mp3-hls-streaming

Stream remote HLS and MP3 streams on iOS and Android.

Install

npm install mp3-hls-streaming
npx cap sync

API

play(...)

play(options: { url: string; }) => Promise<void>
Param Type
options { url: string; }

pause()

pause() => Promise<void>

resume()

resume() => Promise<void>

seekTo(...)

seekTo(options: { position: number; }) => Promise<void>
Param Type
options { position: number; }

stop()

stop() => Promise<void>

setPlaybackRate(...)

setPlaybackRate(options: { rate: number; }) => Promise<void>
Param Type
options { rate: number; }

addListener('error' | 'play' | 'pause' | 'stop' | 'timeUpdate' | 'buffering', ...)

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()

removeAllListeners() => Promise<void>

Interfaces

PluginListenerHandle

Prop Type
remove () => Promise<void>

PlayEvent

Prop Type
type 'play'

PauseEvent

Prop Type
type 'pause'

StopEvent

Prop Type
type 'stop'

TimeUpdateEvent

Prop Type
type 'timeUpdate'
currentTime number

BufferingEvent

Prop Type
type 'buffering'
isBuffering boolean

ErrorEvent

Prop Type
type 'error'
message string

Type Aliases

RemoteStreamerEventData

PlayEvent | PauseEvent | StopEvent | TimeUpdateEvent | BufferingEvent | ErrorEvent

About

Stream HLS and MP3 remote streams using capacitor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published