SubscriberKit.VideoListener

public abstract static interface VideoListener

Enclosing class: SubscriberKit

Monitors when the subscriber starts and stops receiving video data.

Methods

Name Description
onVideoDataReceived(subscriber) Invoked when an subscriber initially receives video data.
onVideoDisableWarning(subscriber) Called when the OpenTok Media Router determines that the stream quality has degraded and the video will be disabled if the quality degrades further.
onVideoDisableWarningLifted(subscriber) Called when the OpenTok Media Router determines that the stream quality has improved to the point at which the video being disabled is not an immediate risk.
onVideoDisabled(subscriber, reason) Called when the subscriber stops receiving video.
onVideoEnabled(subscriber, reason) Called when the subscriber's video stream starts (when there previously was no video) or resumes (after video was disabled).

onVideoDataReceived(subscriber)

Invoked when an subscriber initially receives video data.

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

onVideoDisableWarning(subscriber)

Called when the OpenTok Media Router determines that the stream quality has degraded and the video will be disabled if the quality degrades further. If the quality degrades further, the subscriber disables the video and the onVideoDisabled(SubscriberKit subscriber, String reason) method called. If the stream quality improves, the onVideoDisableWarningLifted(SubscriberKit subscriber) method is called.

This feature is only available in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), not in sessions with the media mode set to relayed. (See The OpenTok Media Router and media modes).

This method is mainly called when connection quality degrades.

Parameters:
Name Type Description
subscriber SubscriberKit The SubscriberKit that may stop receiving video soon.

onVideoDisableWarningLifted(subscriber)

Called when the OpenTok Media Router determines that the stream quality has improved to the point at which the video being disabled is not an immediate risk. This method is called after the onVideoDisableWarning(SubscriberKit subscriber) method is called.

This feature is only available in sessions that use the OpenTok Media Router (sessions with the media mode set to routed), not in sessions with the media mode set to relayed. (See The OpenTok Media Router and media modes.)

This method is mainly called when connection quality improves.

Parameters:
Name Type Description
subscriber SubscriberKit The SubscriberKit instance.

onVideoDisabled(subscriber, reason)

Called when the subscriber stops receiving video. Check the reason parameter for the reason why the video stopped.

Parameters:
Name Type Description
subscriber SubscriberKit The instance invoking this call.
reason String The reason that the video track was disabled. This is set to one of the following values: SubscriberKit.VIDEO_REASON_PUBLISH_VIDEO, SubscriberKit.VIDEO_REASON_SUBSCRIBE_TO_VIDEO, SubscriberKit.VIDEO_REASON_QUALITY, or SubscriberKit.VIDEO_REASON_CODEC_NOT_SUPPORTED.

onVideoEnabled(subscriber, reason)

Called when the subscriber's video stream starts (when there previously was no video) or resumes (after video was disabled). Check the reason parameter for the reason why the video stopped.

Parameters:
Name Type Description
subscriber SubscriberKit The instance invoking this call.
reason String The reason that the video track was started (or resumed). This is set to one of the following values: SubscriberKit.VIDEO_REASON_PUBLISH_VIDEO, SubscriberKit.VIDEO_REASON_SUBSCRIBE_TO_VIDEO, or SubscriberKit.VIDEO_REASON_QUALITY.