Red5ProPublisher()

Main entry for failover support of all publisher implementations.

new Red5ProPublisher()

Extends

Members

publishTypes :Object

Return enumerated value Publisher types used in failover order.

Methods

getPublishOrder() → {Array}

Returns the specified order for auto-failover.

Returns:
Array -

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

init(options) → {Promise}

Request to initialize and determine the proper Publisher implementation based on configuration. The returned Promise will either resolve with the determined Publisher instance or reject with an error String in failure to determine Publisher 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
Inherited From:

on(type, fn)

Assign a callback handler to an event type.

Parameters:
Name Type Description
type String
fn function
Inherited From:

setPublishOrder(order) → {Red5ProPublisher}

Defines the desired auto-failover order.

Parameters:
Name Type Description
order Array

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

Returns:
Red5ProPublisher -

This instance.

trigger(event)

Dispatch an event to be handled by any assigned callbacks.

Parameters:
Name Type Description
event Event
Inherited From: