THEOlivePlayer

The player API.

Properties

Link copied to clipboard

Get or set whether the audio is muted.

Link copied to clipboard

Get or set whether the player is paused.

Link copied to clipboard

Get the volume of the audio.

Functions

Link copied to clipboard
fun addEventListener(eventListener: EventListener)

Add an event listener.

Link copied to clipboard
fun addHeaderProvider(headerProvider: HeaderProvider)

Add a header provider which allows adding headers to the requests the player makes.

Link copied to clipboard
fun goLive()

Seek to the live edge.

Link copied to clipboard
fun loadChannel(channelId: String)

Load a channel.

Link copied to clipboard
fun pause()

Pause playback.

Link copied to clipboard
fun play()

Start or resume playback.

Link copied to clipboard
fun preloadChannels(channelIds: Array<String>)

Preload some channels to allow faster switching between channels. This will retrieve the metadata of all the given channel ids and store it so next loadChannel calls are faster.

Link copied to clipboard

Remove an event listener.

Link copied to clipboard

Remove a previously added header provider.

Link copied to clipboard
fun reset()

Resets the player. This will stop playback and reset the state. But unlike destroy, can be followed up with a new loadChannel call.