fix: correct seeking to a sentence on web

This commit is contained in:
Antoine Jaury
2026-09-30 11:18:54 +02:00
parent 880aba06a2
commit d3a0e09f9c
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Desktop: audio playback failed with *Failed to play audio* on every record,
because the JDK cannot decode the `.m4a` (AAC) recordings on its own.
- add emoji fallback for web
- correct seeking to a sentence on web
## [1.0.0-alpha02] - 2026-08-04
@@ -24,7 +24,8 @@ internal class WebAudioPlayer : AudioPlayer {
get() = (audio?.duration?.takeIf { it.isFinite() } ?: 0.0).seconds
override fun seekTo(position: Duration) {
audio?.currentTime = position.inWholeMicroseconds.toDouble()
audio?.currentTime = position.inWholeMilliseconds.toDouble() / 1000
audio?.play()
}
override fun load(uri: String) {