mirror of
https://github.com/videolan/vlc-android
synced 2024-11-23 18:05:36 +08:00
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.
This commit is contained in:
parent
83e1f64376
commit
f93d4e1e19
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user