MetricsCollector

Playback stats metrics Compute playback stats metrics likes stalls, playtime, bitrate, etc...

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface Listener

Listener

Functions

Link copied to clipboard

Add listener

Link copied to clipboard

Get current metrics

Link copied to clipboard
Link copied to clipboard
open override fun onAudioDisabled(eventTime: AnalyticsListener.EventTime, decoderCounters: DecoderCounters)
Link copied to clipboard
open override fun onAudioInputFormatChanged(eventTime: AnalyticsListener.EventTime, format: Format, decoderReuseEvaluation: DecoderReuseEvaluation?)
Link copied to clipboard
open override fun onAudioPositionAdvancing(eventTime: AnalyticsListener.EventTime, playoutStartSystemTimeMs: Long)
Link copied to clipboard
Link copied to clipboard
open override fun onBandwidthEstimate(eventTime: AnalyticsListener.EventTime, totalLoadTimeMs: Int, totalBytesLoaded: Long, bitrateEstimate: Long)
Link copied to clipboard

On blocked time range reached

Link copied to clipboard
open fun onChapterChanged(eventTime: AnalyticsListener.EventTime, chapter: Chapter?)

onChapterChanged is called when either:

Link copied to clipboard
open fun onCreditChanged(eventTime: AnalyticsListener.EventTime, credit: Credit?)

onCreditChanged is called when either:

Link copied to clipboard

On current session changed from oldSession to newSession. onSessionDestroyed with oldSession is called right after.

Link copied to clipboard
open override fun onDrmKeysLoaded(eventTime: AnalyticsListener.EventTime)
Link copied to clipboard
open override fun onDrmKeysRemoved(eventTime: AnalyticsListener.EventTime)
Link copied to clipboard
open override fun onDrmKeysRestored(eventTime: AnalyticsListener.EventTime)
Link copied to clipboard
Link copied to clipboard
open override fun onDroppedVideoFrames(eventTime: AnalyticsListener.EventTime, droppedFrames: Int, elapsedMs: Long)
Link copied to clipboard
Link copied to clipboard
open override fun onIsPlayingChanged(eventTime: AnalyticsListener.EventTime, isPlaying: Boolean)
Link copied to clipboard
open override fun onLoadCompleted(eventTime: AnalyticsListener.EventTime, loadEventInfo: LoadEventInfo, mediaLoadData: MediaLoadData)
Link copied to clipboard
open override fun onLoadError(eventTime: AnalyticsListener.EventTime, loadEventInfo: LoadEventInfo, mediaLoadData: MediaLoadData, error: IOException, wasCanceled: Boolean)
Link copied to clipboard
open override fun onLoadStarted(eventTime: AnalyticsListener.EventTime, loadEventInfo: LoadEventInfo, mediaLoadData: MediaLoadData)
Link copied to clipboard
Link copied to clipboard
open override fun onPlaybackStateChanged(eventTime: AnalyticsListener.EventTime, state: Int)
Link copied to clipboard
open override fun onPlayerReleased(eventTime: AnalyticsListener.EventTime)
Link copied to clipboard
open override fun onRenderedFirstFrame(eventTime: AnalyticsListener.EventTime, output: Any, renderTimeMs: Long)
Link copied to clipboard
Link copied to clipboard

On session created

Link copied to clipboard

On session destroyed. The session won't be current anymore.

Link copied to clipboard
open fun onSmoothSeekingEnabledChanged(eventTime: AnalyticsListener.EventTime, smoothSeekingEnabled: Boolean)

On smooth seeking enabled changed

Link copied to clipboard
open override fun onStallChanged(eventTime: AnalyticsListener.EventTime, isStall: Boolean)

A Stall occurs when the player is Player.STATE_BUFFERING after being Player.STATE_READY during playback without user interactions.

Link copied to clipboard
open override fun onSurfaceSizeChanged(eventTime: AnalyticsListener.EventTime, width: Int, height: Int)
Link copied to clipboard
Link copied to clipboard
open fun onTrackingEnabledChanged(eventTime: AnalyticsListener.EventTime, trackingEnabled: Boolean)

On tracking enabled changed

Link copied to clipboard
Link copied to clipboard
open override fun onVideoDisabled(eventTime: AnalyticsListener.EventTime, decoderCounters: DecoderCounters)

On video disabled is called when releasing the player

Link copied to clipboard
open override fun onVideoInputFormatChanged(eventTime: AnalyticsListener.EventTime, format: Format, decoderReuseEvaluation: DecoderReuseEvaluation?)
Link copied to clipboard
Link copied to clipboard

Remove listener

Link copied to clipboard

Set player at PillarboxExoPlayer creation.