[Android] Fix the volume reset to 0 after each playback

Nicolas Pomepuy git at videolan.org
Thu Jul 15 11:23:53 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 13 13:11:53 2021 +0200| [a850ce3cd286e30b8b81a79a2cacc1f9c4c14786] | committer: Nicolas Pomepuy

Fix the volume reset to 0 after each playback

Fixes #2093

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

 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 75a4ed6a9..4127cd5d5 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -101,7 +101,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
         val mp = mediaplayer
         val volume = mp.volume
         mediaplayer = newMediaPlayer()
-        if (volume != 100) {
+        if (volume > 100) {
             mediaplayer.volume = volume
         }
         release(mp)



More information about the Android mailing list