Red5ProSubscriber()

Main entry for failover support of all subscriber implementations.

new Red5ProSubscriber()

Extends

Members

playbackTypes :Object

Return enumerated value Subscriber types used in failover order.

Methods

getPlaybackOrder() → {Array}

Returns the specified order for auto-failover.

Returns:
Array -

Default: ['rtc', 'rtmp', 'hls'].

init(options) → {Promise}

Request to initialize and determine the proper Subscriber implementation based on configuration.

The returned Promise will either resolve with the determined Subscriber instance or reject with an error String in failure to determine Subscriber type.

Parameters:
Name Type Description
options Object

The initialization configuration map for each desired failover tech.

Returns:
Promise

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:

setPlaybackOrder(order)

Defines the desired auto-failover order.

Parameters:
Name Type Description
order Array

The desired order. e.g, ['rtc', 'rtmp', 'hls'].

trigger(event)

Dispatch an event to be handled by any assigned callbacks.

Parameters:
Name Type Description
event Event
Overrides: