SubscriberKit.MediaLinkStatsListener
public abstract static interface MediaLinkStatsListener
Enclosing class: SubscriberKit
Defines the listener object for getting subscriber media link statistics, including transport-level metrics and network condition changes.
Methods
| Name | Description |
|---|---|
onMediaLinkStats(subscriber, mediaLinkStats) |
Called periodically to report media link statistics for the subscriber. |
onNetworkConditionChanged(subscriber, mediaLinkStats, reason) |
Called whenever a network condition change is detected for the subscriber or remote publisher. |
onMediaLinkStats(subscriber, mediaLinkStats)
Called periodically to report media link statistics for the subscriber. It provides transport-level metrics for both the local subscriber and the remote publisher.
Parameters:
| Name | Type | Description |
|---|---|---|
subscriber |
SubscriberKit | The subscriber instance. |
mediaLinkStats |
SubscriberKit.SubscriberMediaLinkStats | The media link statistics. |
onNetworkConditionChanged(subscriber, mediaLinkStats, reason)
Called whenever a network condition change is detected for the subscriber or remote publisher.
This callback reports changes in overall network health rather than changes in the subscriber's video track state. It differs from video enabled/disabled callbacks in that it provides diagnostic information about network conditions.
The reason parameter indicates the cause of the network condition change and
is currently reported as NETWORK_REASON_NETWORK_CONDITION_CHANGE.
Applications can use this callback to react to network issues, such as updating UI indicators, logging telemetry, or triggering adaptive behavior.
Parameters:
| Name | Type | Description |
|---|---|---|
subscriber |
SubscriberKit | The subscriber whose network condition changed. |
mediaLinkStats |
SubscriberKit.SubscriberMediaLinkStats | The media link statistics. |
reason |
String | String describing the reason for the network condition change. |