PublisherKit.MediaLinkStatsListener

public abstract static interface MediaLinkStatsListener

Enclosing class: PublisherKit

Defines the listener object for getting publisher media link statistics.

Methods

Name Description
onMediaLinkStats(publisher, mediaLinkStats) Called periodically to report media link statistics for the publisher.
onNetworkConditionChanged(publisher, mediaLinkStats, reason) Called whenever a network condition change is detected for the publisher.

onMediaLinkStats(publisher, mediaLinkStats)

Called periodically to report media link statistics for the publisher. It provides transport-level metrics.

Parameters:
Name Type Description
publisher PublisherKit The publisher instance.
mediaLinkStats PublisherKit.PublisherMediaLinkStats[] The media link statistics.

onNetworkConditionChanged(publisher, mediaLinkStats, reason)

Called whenever a network condition change is detected for the publisher.

This callback reports changes in overall network health rather than changes in the publisher'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
publisher PublisherKit The publisher whose network condition changed.
mediaLinkStats PublisherKit.PublisherMediaLinkStats The media link statistics.
reason String String describing the reason for the network condition change (mapped from native enum).