OTPublisherKitNetworkStatsDelegate Protocol Reference
| Conforms to | NSObject |
|---|---|
| Declared in | OTPublisherKit.h |
Overview
Used to monitor audio and video statistics for the publisher. See [OTPublisherKit networkStatsDelegate].
– publisher:videoNetworkStatsUpdated:
Sent periodically to report video statistics for the publisher.
- (void)publisher:(nonnull OTPublisherKit *)publisher videoNetworkStatsUpdated:(nonnull NSArray<OTPublisherKitVideoNetworkStats*> *)statsParameters
publisher |
The publisher these statistic apply to. |
|---|---|
stats |
An array of OTPublisherKitVideoNetworkStats objects. For a publisher in a routed session (one that uses the OpenTok Media Router), this array includes one object, defining the statistics for the single video media stream that is sent to the OpenTok Media Router. In a relayed session, the array includes an object for each subscriber to the published stream. The OTPublisherKitVideoNetworkStats object includes properties. properties for the video bytes received, video packets lost, and video packets sent for the publisher. |
Declared In
OTPublisherKit.h
– publisher:audioNetworkStatsUpdated:
Sent periodically to report audio statistics for the publisher.
- (void)publisher:(nonnull OTPublisherKit *)publisher audioNetworkStatsUpdated:(nonnull NSArray<OTPublisherKitAudioNetworkStats*> *)statsParameters
publisher |
The publisher these statistic apply to. |
|---|---|
stats |
An array of OTPublisherKitAudioNetworkStats objects. For a publisher in a routed session (one that uses the OpenTok Media Router), this array includes one object, defining the statistics for the single audio media stream that is sent to the OpenTok Media Router. In a relayed session, the array includes an object for each subscriber to the published stream. The OTPublisherKitAudioNetworkStats object includes properties. properties for the audio bytes received, audio packets lost, and audio packets sent for the publisher. |
Declared In
OTPublisherKit.h
– publisher:videoQualityChanged:reason:
Called whenever there is a change in the quality state of the publisher’s video stream.
- (void)publisher:(nonnull OTPublisherKit *)publisher videoQualityChanged:(nonnull OTPublisherKitVideoNetworkStats *)stats reason:(OTPublisherVideoEventReason)reasonParameters
publisher |
The publisher whose video stream quality has changed. |
|---|---|
stats |
Updated video statistics, including details about resolution or video layer changes. |
reason |
The reason code for the quality change, based on the |
Discussion
This method provides diagnostic information about video quality changes, including updated statistics and the reason why the event occurred.
The reason parameter indicates the cause of the event and is considered with the following
priority order: bandwidth degradation, CPU degradation, other quality degradation reasons,
codec changes, and resolution or video layer changes.
Unlike the publisher:videoEnabled: and publisher:videoDisabled: delegate methods,
which indicate that the video track has been turned on or off (for example, due to
a stream property update or audio-fallback), this callback reports quality-related
changes even when video remains enabled. Applications can use this delegate to monitor
quality changes and react accordingly—for example, by adjusting UI elements or triggering
alerts.
Declared In
OTPublisherKit.h