[Android] Playback: Preserve 'play as audio' state

Geoffrey Métais git at videolan.org
Fri Dec 6 06:59:38 CET 2019


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec  5 10:54:52 2019 +0000| [66c5b0aa760b2f6d7caea2d582c5b322798d59f3] | committer: Nicolas Pomepuy

Playback: Preserve 'play as audio' state

Fix #1101


(cherry picked from commit ba9bb273ba2deab57adf9338149336b30fe6a806)

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

 vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index a89463acd..7294fe8a2 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -200,7 +200,6 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
             stop()
             return
         }
-        videoBackground = videoBackground || (!player.isVideoPlaying() && player.canSwitchToVideo())
         launch { playIndex(currentIndex) }
     }
 
@@ -266,6 +265,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
     }
 
     suspend fun playIndex(index: Int, flags: Int = 0) {
+        videoBackground = videoBackground || (!player.isVideoPlaying() && player.canSwitchToVideo())
         if (mediaList.size() == 0) {
             Log.w(TAG, "Warning: empty media list, nothing to play !")
             return



More information about the Android mailing list