HLSSubscriber()

Main entry for HLS-based Subscriber.

new HLSSubscriber()

Extends

Methods

getConnection() → {Object}

Returns connection handler for playback.

Returns:
Object

getControls() → {PlaybackControls}

Returns reference to playback controls if available.

Returns:
PlaybackControls

getOptions() → {Object}

Returns the initialization configuration used in init().

Returns:
Object

getPlayer() → {Element}

Returns the target view Element.

Returns:
Element

getType() → {String}

Returns the type of implementation: RTC.

Returns:
String

init(options) → {Promise}

Request to initialize the HLS-based Subscriber based on configuration. The returned Promise will either resolve with a reference to this instance or reject with an error String in failure.

Parameters:
Name Type Description
options Object

The initialization configuration map.

Returns:
Promise

mute()

Request to mute the audio of the stream.

Overrides:

off(type, fn)

Remove a callback handler for an event type.

Parameters:
Name Type Description
type String
fn function
Overrides:

on(type, fn)

Assign a callback handler to an event type.

Parameters:
Name Type Description
type String
fn function
Overrides:

pause()

Request to pause playback of stream.

Overrides:

play()

Request to start playing the stream.

Overrides:

resume()

Request to resume playback od stream.

Overrides:

seekTo(value, duration)

Request to set playback point in time.

Parameters:
Name Type Description
value Number

Either the percentage of the duration (if provided) or the time in seconds.

duration Number

Optional duration of video (when known through VOD) to use to determine time based on first param passed as percentage.

Overrides:

setVolume(value)

Request to set volume of audio of stream.

Parameters:
Name Type Description
value Number

From 0..1.

Overrides:

stop()

Request to stop playback of stream.

Overrides:

subscribe() → {Promise}

Request to begin subscribing to a stream.

Returns:
Promise -

The returned Promise will resolve or reject on successful start of playback.

toggleFullScreen()

Request to toggle fullscreen state.

Overrides:

trigger(event)

Dispatch an event to be handled by any assigned callbacks.

Parameters:
Name Type Description
event Event
Overrides:

unmute()

Request to unmute the audio of the stream.

Overrides:

unsubscribe() → {Promise}

Request to stop a subscription. The returned Promise will either resolve or reject on successful stop of subscription.

Returns:
Promise