new: add playback speed control
This commit is contained in:
1 parent
9aaffdc363
commit
3847f46adb
20 files changed
+618
-80
No files matched your search
+4
@@ -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)
|
||||
|
||||
+2
@@ -25,6 +25,8 @@ interface PlaybackRepository {
|
||||
|
||||
fun seekTo(position: Duration)
|
||||
|
||||
fun setSpeed(speed: Float)
|
||||
|
||||
fun seekToSentence(sentenceIndex: Int)
|
||||
|
||||
fun goToPreviousSentence()
|
||||
|
||||
Reference in new issue
Block a user