[Android] Fix play as audio feature

Nicolas Pomepuy git at videolan.org
Thu May 28 07:24:32 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue May 26 13:14:52 2020 +0200| [e0b95615d586103af8b223d6d5294fac8124dbd2] | committer: Nicolas Pomepuy

Fix play as audio feature

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

 .../vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index e19e5ca26..8e4b7e408 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -858,6 +858,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
                 if (switchToPopup)
                     switchToPopup(currentMediaPosition)
                 else {
+                    mediaplayer.detachViews()
                     currentMediaWrapper?.addFlags(MediaWrapper.MEDIA_FORCE_AUDIO)
                     showWithoutParse(currentMediaPosition)
                 }
@@ -884,7 +885,7 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
         /* Stop listening for changes to media routes. */
         if (!isBenchmark) displayManager.removeMediaRouterCallback()
 
-        if (!displayManager.isSecondary) service?.mediaplayer?.detachViews()
+         if (!displayManager.isSecondary) service?.mediaplayer?.detachViews()
     }
 
     override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {



More information about the Android mailing list