RTMPPublisher()

Main entry for Flash-based Publisher.

new RTMPPublisher()

Extends

Methods

getOptions() → {Object}

Returns the initialization configuration used in init().

Returns:
Object

getType() → {String}

Returns the type of implementation: RTMP.

Returns:
String

init(options) → {Promise}

Request to initialize the Flash-based Publisher 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

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:

publish(streamName, promise) → {Promise}

Request to being a broadcast session after initilization has occured.

Parameters:
Name Type Description
streamName String

Optional stream name to broadcast on, otherwise defaulting to the streamName provided in init() configuration.

promise Promise

Optional Promise object to resolve/reject on based on sequence of events in establishing a broadcast, otherwise defaulting to Promise created internally and returned.

Returns:
Promise -

The returned Promise will resolve or reject on successful start of a broadcast.
There are several processes that occur in order to establish a Flash-based broadcast that involve - but are not limited to - proper embed of Flash object on page with flashvars used in establishing RTMP-based NetConnection.

send(methodName, data)

Request to send a message to all subscribers.

Parameters:
Name Type Description
methodName String

The method name associated with the message to be accepted by all subscribers.

data Object

The data object to send associated with the method name.

trigger(event)

Dispatch an event to be handled by any assigned callbacks.

Parameters:
Name Type Description
event Event
Inherited From:

unpublish() → {Promise}

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

Returns:
Promise