Enclosing class: : SubscriberKit


public static interface SubscriberKit.VideoStatsListener

Defines the listener object for getting subscriber video statistics.

See Also: : - SubscriberKit.setVideoStatsListener(VideoStatsListener listener)

Method Summary

All MethodsInstance MethodsAbstract MethodsDefault Methods

Modifier and Type

Method

Description

default void

onVideoQualityChanged(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats, String reason)

Listener for quality-related video events for a subscriber.

void

onVideoStats(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats)

Called periodically to report video statistics for the subscriber.

Method Details

onVideoStats

void onVideoStats(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats)

Called periodically to report video statistics for the subscriber.

Parameters: : subscriber - The subscriber. : stats - The video statistics.

onVideoQualityChanged

default void onVideoQualityChanged(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats, String reason)

Listener for quality-related video events for a subscriber.

This callback is triggered when a significant quality-related event occurs in the subscriber’s video stream. Currently, it is primarily used to notify about long video interruptions (pauses) lasting 5 seconds or more.

Short freezes are tracked internally and reflected in the subscriber’s SubscriberKit.SubscriberVideoStats, but they do not trigger this callback due to their short duration and high frequency.

The reason parameter indicates the cause of the event, following this priority order:

Unlike the SubscriberKit.VideoListener.onVideoDisabled(SubscriberKit, String) and SubscriberKit.VideoListener.onVideoEnabled(SubscriberKit, String) methods, which are triggered when the video track itself is turned off or on (for example, due to audio fallback or stream property changes), this callback reports quality-related changes while the video remains enabled.

Applications can use this callback to update the UI, log telemetry, or notify users about video interruptions.

Parameters: : subscriber - The subscriber whose video stream experienced the event. : stats - The latest SubscriberKit.SubscriberVideoStats at the time of the event. : reason - The reason for the quality event