Update and tweak seeker

This commit is contained in:
Maxr1998
2023-08-22 13:14:41 +02:00
parent 61e2886bba
commit 09c9721d18
2 changed files with 8 additions and 5 deletions
@@ -74,7 +74,8 @@ fun PlaybackProgress(
Seeker(
modifier = Modifier.fillMaxWidth(),
value = if (isDragged) seekPosition else position.content.toFloat() / duration.toFloat(),
value = position.content.toFloat() / duration.toFloat(),
thumbValue = if (isDragged) seekPosition else position.content.toFloat() / duration.toFloat(),
readAheadValue = position.buffer.toFloat() / duration.toFloat(),
onValueChange = { value ->
seekPosition = value
@@ -83,10 +84,12 @@ fun PlaybackProgress(
onSeek((seekPosition * duration).toLong())
},
colors = SeekerDefaults.seekerColors(
trackColor = Color(0x33FFFFFF),
readAheadColor = Color(0xCCFFFFFF),
trackColor = Color(0x20FFFFFF),
readAheadColor = Color(0x80FFFFFF),
),
dimensions = SeekerDefaults.seekerDimensions(
thumbRadius = thumbRadius,
),
dimensions = SeekerDefaults.seekerDimensions(thumbRadius = thumbRadius),
interactionSource = interactionSource,
)
}
+1 -1
View File
@@ -33,7 +33,7 @@ compose = "1.5.0"
compose-foundation = "1.5.0"
compose-material = "1.5.0"
compose-compiler = "1.5.1"
seeker = "1.1.0"
seeker = "1.2.1"
# Network
jellyfin-sdk = "1.4.3"