[Android] Continue playback in background if app is in background
Nicolas Pomepuy
git at videolan.org
Mon Jun 12 16:10:46 UTC 2023
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jun 12 08:02:10 2023 +0200| [b712ab392ff911bc14bec7b9263294a2b97a1bda] | committer: Duncan McNamara
Continue playback in background if app is in background
Fixes #616
> https://code.videolan.org/videolan/vlc-android/commit/b712ab392ff911bc14bec7b9263294a2b97a1bda
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
index 451f13d8f2..59ebbbf97a 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -391,7 +391,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
suspend fun playIndex(index: Int, flags: Int = 0, forceResume:Boolean = false, forceRestart:Boolean = false) {
- videoBackground = videoBackground || (!player.isVideoPlaying() && player.canSwitchToVideo())
+ videoBackground = videoBackground || (!player.isVideoPlaying() && player.canSwitchToVideo()) || !isAppStarted()
if (mediaList.size() == 0) {
Log.w(TAG, "Warning: empty media list, nothing to play !")
return
More information about the Android
mailing list