PlayerState

An atomic snapshot of the player, across five orthogonal axes.

Never torn: a reader cannot see playing and errored at the same time. The constructor is marked internal so a snapshot is only ever assembled where every axis is known.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The loaded composition's duration, or null when none is loaded.

Link copied to clipboard

True when a composition is loaded and presentable.

Link copied to clipboard

True when something is in flight that the user should see a spinner for.

Link copied to clipboard

Strictly playing: ready, wanted, and not stalled.

Link copied to clipboard

True when a seek has been issued and its frame has not been presented.

Link copied to clipboard

Data. True when playback cannot advance at the current position, so this is what a spinner reads.

Link copied to clipboard

Intent. Flipped synchronously by VideoPlayer.play and VideoPlayer.pause, and never by buffering, so this is what a play or pause button reads.

Link copied to clipboard

Where the player is in its lifecycle.