fix: correct seeking to a sentence on web
This commit is contained in:
1 parent
880aba06a2
commit
d3a0e09f9c
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user