Package com.opentok.android
Interface PublisherKit.MediaLinkStatsListener
- Enclosing class:
PublisherKit
public static interface PublisherKit.MediaLinkStatsListener
Defines the listener object for getting publisher media link statistics.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonMediaLinkStats(PublisherKit publisher, PublisherKit.PublisherMediaLinkStats[] mediaLinkStats) Called periodically to report media link statistics for the publisher.default voidonNetworkConditionChanged(PublisherKit publisher, PublisherKit.PublisherMediaLinkStats mediaLinkStats, String reason) Called whenever a network condition change is detected for the publisher.
-
Method Details
-
onMediaLinkStats
default void onMediaLinkStats(PublisherKit publisher, PublisherKit.PublisherMediaLinkStats[] mediaLinkStats) Called periodically to report media link statistics for the publisher. It provides transport-level metrics.
- Parameters:
publisher- The publisher instance.mediaLinkStats- The media link statistics.
-
onNetworkConditionChanged
default void onNetworkConditionChanged(PublisherKit publisher, PublisherKit.PublisherMediaLinkStats mediaLinkStats, String 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
reasonparameter indicates the cause of the network condition change and is currently reported asNETWORK_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:
publisher- The publisher whose network condition changed.mediaLinkStats- The media link statistics.reason- String describing the reason for the network condition change (mapped from native enum).
-