Interface SubscriberKit.VideoStatsListener
- Enclosing class:
SubscriberKit
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonVideoQualityChanged(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats, String reason) Listener for quality-related video events for a subscriber.voidonVideoStats(SubscriberKit subscriber, SubscriberKit.SubscriberVideoStats stats) Called periodically to report video statistics for the subscriber.
-
Method Details
-
onVideoStats
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
TheSubscriberKit.SubscriberVideoStats, but they do not trigger this callback due to their short duration and high frequency.reasonparameter indicates the cause of the event, following this priority order:SubscriberKit.VIDEO_REASON_INTERRUPTIONSubscriberKit.VIDEO_REASON_CODEC_CHANGESubscriberKit.VIDEO_REASON_RESOLUTION_CHANGE
Unlike the
Applications can use this callback to update the UI, log telemetry, or notify users about video interruptions.SubscriberKit.VideoListener.onVideoDisabled(SubscriberKit, String)andSubscriberKit.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.- Parameters:
subscriber- The subscriber whose video stream experienced the event.stats- The latestSubscriberKit.SubscriberVideoStatsat the time of the event.reason- The reason for the quality event
-