mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-02-24 04:52:29 +00:00
fix: bug in playback speed
This commit is contained in:
@@ -90,6 +90,10 @@ class VlcPlayerModule : Module() {
|
||||
AsyncFunction("setVideoScaleFactor") { view: VlcPlayerView, scaleFactor: Float ->
|
||||
view.setVideoScaleFactor(scaleFactor)
|
||||
}
|
||||
|
||||
AsyncFunction("setRate") { view: VlcPlayerView, rate: Float ->
|
||||
view.setRate(rate)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,6 +343,11 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
||||
mediaPlayer?.scale = scaleFactor
|
||||
}
|
||||
|
||||
fun setRate(rate: Float) {
|
||||
log.debug("Setting playback rate: $rate")
|
||||
mediaPlayer?.rate = rate
|
||||
}
|
||||
|
||||
private fun setInitialExternalSubtitles() {
|
||||
externalSubtitles?.let { subtitles ->
|
||||
for (subtitle in subtitles) {
|
||||
|
||||
Reference in New Issue
Block a user