[Android] Audioplayer: fix switchToVideo called for audio
Geoffrey Métais
git at videolan.org
Fri Dec 7 15:01:40 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 7 15:00:32 2018 +0100| [61d6562838a887430b3c0fe7be3d07e1453c9ba3] | committer: Geoffrey Métais
Audioplayer: fix switchToVideo called for audio
> https://code.videolan.org/videolan/vlc-android/commit/61d6562838a887430b3c0fe7be3d07e1453c9ba3
---
vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
index 9ea9b92a5..a9a03d1d2 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
@@ -167,7 +167,7 @@ class PlaylistModel : ScopedModel(), PlaybackService.Callback by EmptyPBSCallbac
service?.apply {
if (PlaylistManager.hasMedia() && !isVideoPlaying) {
currentMediaWrapper?.run {
- if (!hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO)) {
+ if (!hasFlag(MediaWrapper.MEDIA_FORCE_AUDIO) && canSwitchToVideo()) {
switchToVideo()
return true
}
More information about the Android
mailing list