mp3-hls-streaming
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i mp3-hls-streaming

Weekly Downloads

4

Version

0.1.21

License

MIT

Unpacked Size

65.2 kB

Total Files

25

Last publish

Collaborators

  • whiskeredaxe