refactor: improve player package structure
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package fr.ajaury.gwenedeg.player.model
|
||||
|
||||
data class PlaybackTiming(
|
||||
val positionMs: Long = 0L,
|
||||
val durationMs: Long = 0L,
|
||||
) {
|
||||
val progress: Float
|
||||
get() = if (durationMs > 0) (positionMs.toFloat() / durationMs).coerceIn(0f, 1f) else 0f
|
||||
}
|
||||
Reference in New Issue
Block a user