PublisherKit.PublisherListener

public abstract static interface PublisherListener

Enclosing class: PublisherKit

Monitors when a publisher starts and stops streaming to the session.

Methods

Name Description
onError(publisher, error) Invoked when the publisher fails.
onStreamCreated(publisher, stream) Invoked when the publisher's stream is created.
onStreamDestroyed(publisher, stream) Invoked when the publisher's stream is destroyed.

onError(publisher, error)

Invoked when the publisher fails.

Most errors are fatal: the publisher is automatically dropped and can no longer be used. Some errors are continuable and leave the publisher usable; when an error is non-fatal it is stated in the error description.

Parameters:
Name Type Description
publisher PublisherKit The publisher.
error OpentokError The error that invoked this callback.

onStreamCreated(publisher, stream)

Invoked when the publisher's stream is created.

Parameters:
Name Type Description
publisher PublisherKit The publisher.
stream Stream The stream that that is created.

onStreamDestroyed(publisher, stream)

Invoked when the publisher's stream is destroyed.

Parameters:
Name Type Description
publisher PublisherKit The publisher.
stream Stream The stream that that is destroyed.