Files
lockstep-player/app/src/main/java/at/lockstep/player/playback/TrackBoundaryEvent.kt

24 lines
701 B
Kotlin
Raw Normal View History

2026-05-15 09:03:20 +02:00
package at.lockstep.player.playback
/**
* Fired when annotation should flush beats for the track being left:
* user skipped, auto-advance after a track ended, or the last track finished.
*/
data class TrackBoundaryEvent(
val trackId: String,
val title: String,
val artist: String,
/** 0-based index in the current play queue when this track was current. */
val queueIndex: Int,
val queueSize: Int,
val reason: TrackBoundaryReason,
)
enum class TrackBoundaryReason {
/** Left this track for another (skip, previous, or middle track ended). */
ADVANCED_TO_OTHER_TRACK,
/** Playback of the last track in the playlist completed. */
LAST_TRACK_FINISHED,
}