PlaybackEvent

sealed interface PlaybackEvent(source)

Something that happened, delivered once.

Events are edge-triggered and lossless, so drive anything that advances the session from them: looping at the out point, auto-advance, analytics. Passive UI reads PlayerState instead.

Delivered with no replay, so subscribe before issuing commands.

Inheritors

Types

Link copied to clipboard
class EffectsDegraded(val adjustments: List<Adjustment>) : PlaybackEvent

The preview graph had to approximate something.

Link copied to clipboard
class Ended(val finalPosition: Duration, val duration: Duration) : PlaybackEvent

Playback reached the end of the composition.

Link copied to clipboard

Something outside filmstrip changed whether playback is wanted, such as an audio-focus loss, a route change, or the system pausing the app.

Link copied to clipboard
class Failed(val error: PlaybackError) : PlaybackEvent

Playback failed.

Link copied to clipboard

The first frame of a newly set composition reached the surface.

Link copied to clipboard
class QualityDegraded(val policy: PreviewQualityPolicy, val message: String) : PlaybackEvent

The preview had to reduce its own quality to keep up.

Link copied to clipboard
class RangeLooped(val range: TimeRange) : PlaybackEvent

A loop range wrapped around.

Link copied to clipboard
class SeekCompleted(val position: Duration) : PlaybackEvent

A seek landed and its frame was presented.