play

fun play(positionInput: Double? = null)

Begins playing the animation.

If you want to start playing the animation from a specific position, pass a value from 0 to 1 to the play() method where 0 is the beginning of the animation and 1 is the end. For example, use play(0.5) to start playback halfway through the animation.

Parameters

positionInput

An optional position to seek to before toggling play/stop. If null, toggles playback from the current position.


open override fun play(positionInput: Double?, startImmediately: Boolean)

Toggles playback: if not already playing, seeks to positionInput (or the position matching storedDate when null) and transitions to AnimationState.playing, starting the frame- driven play job and bumping reqGeneration so per-layer requested-interval bookkeeping from before this play session is treated as stale; if already playing, stops instead. When startImmediately is false and delay is greater than 0, playback first waits out the configured start delay before advancing.