[Android] Playback: Allow video->audio transition if paused

Geoffrey Métais git at videolan.org
Wed Dec 4 14:16:28 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey at videolan.org> | Wed Dec  4 14:16:27 2019 +0100| [6e81a5a6554acb06a2c95da502b02f70ee458fd9] | committer: Nicolas Pomepuy

Playback: Allow video->audio transition if paused

Fix #1110

> https://code.videolan.org/videolan/vlc-android/commit/6e81a5a6554acb06a2c95da502b02f70ee458fd9
---

 vlc-android/src/org/videolan/vlc/PlaybackService.kt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index c759ed57c..3f9cd31a4 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -1087,8 +1087,7 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope by MainScope
     @MainThread
     fun showWithoutParse(index: Int) {
         playlistManager.setVideoTrackEnabled(false)
-        val media = playlistManager.getMedia(index)
-        if (media == null || !isPlaying) return
+        val media = playlistManager.getMedia(index) ?: return
         // Show an URI without interrupting/losing the current stream
         if (BuildConfig.DEBUG) Log.v(TAG, "Showing index " + index + " with playing URI " + media.uri)
         playlistManager.currentIndex = index



More information about the Android mailing list