OTSubscriberKitNetworkStatsDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | OTSubscriberKit.h |
Overview
Used to monitor audio and video statistics for the subscriber. See [OTSubscriberKit networkStatsDelegate].
– subscriber:videoNetworkStatsUpdated:
Sent periodically to report audio statistics for the subscriber.
- (void)subscriber:(nonnull OTSubscriberKit *)subscriber videoNetworkStatsUpdated:(nonnull OTSubscriberKitVideoNetworkStats *)statsParameters
subscriber |
The subscriber these statistic apply to. |
|---|---|
stats |
An OTSubscriberKitVideoNetworkStats object, which has properties for the video bytes received, video packets lost, and video packets received for the subscriber. |
Declared In
OTSubscriberKit.h
– subscriber:audioNetworkStatsUpdated:
Sent periodically to report video statistics for the subscriber.
- (void)subscriber:(nonnull OTSubscriberKit *)subscriber audioNetworkStatsUpdated:(nonnull OTSubscriberKitAudioNetworkStats *)statsParameters
subscriber |
The subscriber these statistic apply to. |
|---|---|
stats |
An OTSubscriberKitAudioNetworkStats object, which has properties for the audio bytes received, audio packets lost, and audio packets received for the subscriber. |
Declared In
OTSubscriberKit.h
– subscriber:videoQualityChanged:reason:
Called when a quality-related video event occurs for the subscriber.
- (void)subscriber:(nonnull OTSubscriberKit *)subscriber videoQualityChanged:(nonnull OTSubscriberKitVideoNetworkStats *)stats reason:(OTSubscriberVideoEventReason)reasonParameters
subscriber |
The subscriber instance whose video stream triggered this event. |
|---|---|
stats |
The latest subscriber video statistics at the time of the event. |
reason |
The reason for the quality event, based on |
Discussion
This delegate method is triggered when a significant disruption is detected in the subscriber’s video stream. Currently, it only triggers for video interruptions (pauses) lasting 5 seconds or longer, codec changes or resolution changes. Short freezes are tracked internally and reflected in the subscriber statistics, but no callback is triggered for each freeze due to their short duration and high frequency.
The reason parameter indicates the cause of the event and is considered in the
following priority order: OTSubscriberVideoEventVideoInterrupt,
OTSubscriberVideoEventCodecChange.
Unlike the [OTSubscriberKitDelegate subscriberVideoDisabled:reason:] and [OTSubscriberKitDelegate subscriberVideoEnabled:reason:] messages, which indicate that the subscriber’s video track has been turned off or on (for example, due to audio fallback or stream property updates), this callback reports quality-related changes. Applications can use this to update the UI, log telemetry, or notify users about video interruptions.
Declared In
OTSubscriberKit.h