[Android] Add the limits to the playback speed changes

Nicolas Pomepuy git at videolan.org
Wed Jun 5 14:57:37 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May  2 13:39:07 2024 +0200| [748bc83d2308b6fe17ad267b10770f8667aabaff] | committer: Duncan McNamara

Add the limits to the playback speed changes

> https://code.videolan.org/videolan/vlc-android/commit/748bc83d2308b6fe17ad267b10770f8667aabaff
---

 .../vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
index 08b2bc03bb..b0b2a41ae7 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/PlaybackSpeedDialog.kt
@@ -153,6 +153,7 @@ class PlaybackSpeedDialog : VLCBottomSheetDialogFragment() {
     private fun changeSpeedTo(newValue: Float) {
         if (playbackService == null)
             return
+        if (newValue > 4.0F || newValue < 0.25F) return
         playbackService!!.setRate(newValue, true)
         setRateProgress()
     }



More information about the Android mailing list