[Android] Fix playback speed livedata value
Nicolas Pomepuy
git at videolan.org
Mon Sep 9 15:14:15 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Aug 12 13:28:28 2024 +0200| [6026059054ecf96cdfb8fe7da971889d34f50fa2] | committer: Duncan McNamara
Fix playback speed livedata value
> https://code.videolan.org/videolan/vlc-android/commit/6026059054ecf96cdfb8fe7da971889d34f50fa2
---
application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index b5a35a5033..17023d0a9f 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -241,7 +241,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
fun setRate(rate: Float, save: Boolean) {
if (mediaplayer.isReleased) return
mediaplayer.rate = rate
- speed.value = rate
+ speed.postValue(rate)
if (save && settings.getBoolean(if (isVideoPlaying()) KEY_PLAYBACK_SPEED_PERSIST_VIDEO else KEY_PLAYBACK_SPEED_PERSIST, false))
settings.putSingle(if (isVideoPlaying()) KEY_PLAYBACK_RATE_VIDEO else KEY_PLAYBACK_RATE, rate)
}
More information about the Android
mailing list