SleepTimer

sealed interface SleepTimer

When to stop playing on its own.

The engine fades the sound down before it pauses, and puts the level back afterwards, so the volume the user set is never touched and the next play starts at it.

Inheritors

Types

Link copied to clipboard
data class After(val duration: Duration) : SleepTimer

Fire this long from when the timer was armed, measured in wall time while playing.

Link copied to clipboard
data class At(val position: Duration) : SleepTimer

Fire when playback reaches this position in the media.

Link copied to clipboard
data object EndOfItem : SleepTimer

Fire at the end of the current item, without advancing a queue past it.