[Android] Disable video overlays when in PiP mode

Nicolas Pomepuy git at videolan.org
Fri Apr 12 09:41:50 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Fri Apr 12 09:29:10 2019 +0200| [d6da319a39c22be4275431056f7957de655fe7aa] | committer: Nicolas Pomepuy

Disable video overlays when in PiP mode

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index f6bceae8d..fc747ab24 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1365,6 +1365,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
      * @param duration
      */
     void showInfo(String text, int duration) {
+        if (isInPictureInPictureMode()) return;
         initInfoOverlay();
         UiTools.setViewVisibility(mVerticalBar, View.GONE);
         UiTools.setViewVisibility(mOverlayInfo, View.VISIBLE);
@@ -2219,6 +2220,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
      */
     private void showOverlayTimeout(int timeout) {
         if (mService == null) return;
+        if (isInPictureInPictureMode()) return;
         initOverlay();
         if (mHudBinding == null) return;
         if (timeout != 0) mOverlayTimeout = timeout;
@@ -2244,6 +2246,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     }
 
     private void showControls(boolean show) {
+        if (show && isInPictureInPictureMode()) return;
         if (mHudBinding != null) {
             mHudBinding.playerOverlayPlay.setVisibility(show ? View.VISIBLE : View.INVISIBLE);
             if (mSeekButtons) {



More information about the Android mailing list