Browse Source

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.
merge-requests/2174/head
Duncan McNamara 2 years ago
parent
commit
f93d4e1e19
  1. 3
      application/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt

3
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)

Loading…
Cancel
Save