PlaybackMetrics

data class PlaybackMetrics(val sessionId: String, val bandwidth: Long, val indicatedBitrate: Long, val playbackDuration: Duration, val bufferingDuration: Duration, val stallCount: Int, val stallDuration: Duration, val loadDuration: PlaybackMetrics.LoadDuration, val totalLoadTime: Duration, val totalBytesLoaded: Long, val url: Uri?, val videoFormat: Format?, val audioFormat: Format?, val surfaceSize: Size, val totalDroppedFrames: Int)

Represents playback metrics, containing information about the current media stream and playback session.

Constructors

Link copied to clipboard
constructor(sessionId: String, bandwidth: Long, indicatedBitrate: Long, playbackDuration: Duration, bufferingDuration: Duration, stallCount: Int, stallDuration: Duration, loadDuration: PlaybackMetrics.LoadDuration, totalLoadTime: Duration, totalBytesLoaded: Long, url: Uri?, videoFormat: Format?, audioFormat: Format?, surfaceSize: Size, totalDroppedFrames: Int)

Types

Link copied to clipboard
data class LoadDuration(val source: Duration? = null, val manifest: Duration? = null, val asset: Duration? = null, val drm: Duration? = null, val timeToReady: Duration? = null)

Represents the timings spent in different stages of the loading process, until the current media started to play.

Properties

Link copied to clipboard

The Format of the currently selected audio track.

Link copied to clipboard

The device-measured network bandwidth, in bits per second.

Link copied to clipboard

The total duration spent buffering the media.

Link copied to clipboard

The bitrate of the video and audio format, in bits per second.

Link copied to clipboard

The LoadDuration containing detailed timings for different stages of media loading.

Link copied to clipboard

The total duration spent playing the media.

Link copied to clipboard

A unique identifier for the playback session.

Link copied to clipboard

The number of times playback stalled, excluding stalls caused by seeking.

Link copied to clipboard

The total duration of the stalls.

Link copied to clipboard

The size of the surface used for rendering the video. If no surface is connected, this will be Size.ZERO.

Link copied to clipboard

The total number of bytes loaded for bandwidth calculation.

Link copied to clipboard

The total number of video frames dropped.

Link copied to clipboard

The total time taken to load the media for bandwidth calculation.

Link copied to clipboard
val url: Uri?

The last URL loaded by the player.

Link copied to clipboard

The Format of the currently selected video track.

Link copied to clipboard

Represents the video size of videoFormat, if applicable. Otherwise VideoSize.UNKNOWN.