[Android] CustomPip: fix next loosing video
Duncan McNamara
git at videolan.org
Thu Nov 21 13:11:16 UTC 2024
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Nov 20 18:07:02 2024 +0100| [f93d4e1e19a025736de8cce0fa23517bdb3a6377] | committer: Duncan McNamara
CustomPip: fix next loosing video
When running in custom pip, video playback is not in the
videoPlayerActivity. When starting next media, it checks if there is a
video playing, and if (appIsStarted()) which returns false when customPip
is running and the VideoPlayerActivity has been killed.
Because of this, when playing the following media in a playqueue with
custom pip, there no vout. To fix this, this adds a check to
service.isInPiPMode before removing video.
> https://code.videolan.org/videolan/vlc-android/commit/f93d4e1e19a025736de8cce0fa23517bdb3a6377
---
application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 3 ++-
1 file changed, 2 insertions(+), 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 2eb1a1d52c..d1e94f4ed2 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -494,7 +494,8 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
val mw = mediaList.getMedia(index) ?: return
- if (mw.type == MediaWrapper.TYPE_VIDEO && !isAppStarted()) videoBackground = true
+ val isInCustomPiP: Boolean = service.isInPiPMode.value ?: false
+ if (mw.type == MediaWrapper.TYPE_VIDEO && !isAppStarted() && !isInCustomPiP) videoBackground = true
val isVideoPlaying = mw.type == MediaWrapper.TYPE_VIDEO && player.isVideoPlaying()
setRepeatTypeFromSettings()
if (!videoBackground && isVideoPlaying) mw.addFlags(MediaWrapper.MEDIA_VIDEO)
More information about the Android
mailing list