new: add playback speed control

This commit is contained in:
2026-07-03 10:37:28 +02:00
parent 9aaffdc363
commit 3847f46adb
20 changed files with 618 additions and 80 deletions
@@ -136,6 +136,10 @@ internal class PlaybackRepositoryImpl(
audioPlayer.seekTo(position)
}
override fun setSpeed(speed: Float) {
audioPlayer.setSpeed(speed)
}
override fun seekToSentence(sentenceIndex: Int) {
val matchingSubtitleLine = subtitle.value.lines.getOrNull(sentenceIndex) ?: return
audioPlayer.seekTo(matchingSubtitleLine.startTime)
@@ -25,6 +25,8 @@ interface PlaybackRepository {
fun seekTo(position: Duration)
fun setSpeed(speed: Float)
fun seekToSentence(sentenceIndex: Int)
fun goToPreviousSentence()