[Android] Fix video as audio playback resume
Geoffrey Métais
git at videolan.org
Wed Dec 11 10:52:30 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey at videolan.org> | Wed Dec 11 10:52:29 2019 +0100| [ce2abf0aa2eac58945922a53c73174e5b1ece7ae] | committer: Nicolas Pomepuy
Fix video as audio playback resume
Fix #1086
> https://code.videolan.org/videolan/vlc-android/commit/ce2abf0aa2eac58945922a53c73174e5b1ece7ae
---
vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt | 3 ++-
1 file changed, 2 insertions(+), 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 1ee4c2c26..3151f73c7 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlaylistManager.kt
@@ -167,6 +167,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
if (!audio && position < playList.size && settings.getBoolean(VIDEO_PAUSED, false)) {
playList[position].addFlags(AbstractMediaWrapper.MEDIA_PAUSED)
}
+ if (audio) playList[position].addFlags(AbstractMediaWrapper.MEDIA_FORCE_AUDIO)
load(playList, position, true)
loadingLastPlaylist = false
if (!audio) {
@@ -806,7 +807,7 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
}
- internal fun isAudioList() = !player.canSwitchToVideo() && mediaList.isAudioList
+ internal fun isAudioList() = !player.isVideoPlaying() && mediaList.isAudioList
}
class ABRepeat(var start: Long = -1L, var stop: Long = -1L)
More information about the Android
mailing list