SubscriberKit.StreamListener

public abstract static interface StreamListener

Enclosing class: SubscriberKit

Monitors when the subscriber's stream is interrupted and resumes.

Methods

Name Description
onAudioDisabled(subscriber) Called when the subscriber stops receiving audio.
onAudioEnabled(subscriber) Called when the subscriber's audio stream starts (when there previously was no audio) or resumes (after audio was disabled).
onDisconnected(subscriber) Called when the subscriber's stream has been interrupted.
onReconnected(subscriber) Called when the subscriber's stream has resumed, after the SubscriberKit.SubscriberListener#onDisconnected(SubscriberKit subscriber) method is called.

onAudioDisabled(subscriber)

Called when the subscriber stops receiving audio.

Parameters:
Name Type Description
subscriber SubscriberKit The instance invoking this call.

onAudioEnabled(subscriber)

Called when the subscriber's audio stream starts (when there previously was no audio) or resumes (after audio was disabled).

Parameters:
Name Type Description
subscriber SubscriberKit The instance invoking this call.

onDisconnected(subscriber)

Called when the subscriber's stream has been interrupted.

In response to this method being called, you may want to provide a user interface notification, to let the user know that the audio-video stream is temporarily disconnected and the app is trying to reconnect to the stream.

If the client reconnects to the stream, the onReconnected(SubscriberKit subscriber) method is called.

Parameters:
Name Type Description
subscriber SubscriberKit The subscriber.

onReconnected(subscriber)

Called when the subscriber's stream has resumed, after the SubscriberKit.SubscriberListener#onDisconnected(SubscriberKit subscriber) method is called.

Parameters:
Name Type Description
subscriber SubscriberKit The subscriber.