From 81e3790152d90d01bcf00d6b8e88905582d58d93 Mon Sep 17 00:00:00 2001 From: Stypox Date: Tue, 5 May 2020 22:13:49 +0200 Subject: [PATCH 1/2] Always hide controls after a while if video is playing --- .../main/java/org/schabi/newpipe/player/MainVideoPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index 8bd18e309b6..6f738b219a0 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -1098,7 +1098,7 @@ public void safeHideControls(final long duration, final long delay) { } View controlsRoot = getControlsRoot(); - if (controlsRoot.isInTouchMode()) { + if (controlsRoot.isInTouchMode() || isPlaying()) { getControlsVisibilityHandler().removeCallbacksAndMessages(null); getControlsVisibilityHandler().postDelayed(() -> animateView(controlsRoot, false, duration, 0, From bdf293d557093ffeea85d5505782c45ccff6b8d4 Mon Sep 17 00:00:00 2001 From: Stypox Date: Wed, 6 May 2020 18:25:41 +0200 Subject: [PATCH 2/2] Decrease controls hide time when using dpad --- app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java index 5fb94e6c514..ff6e88be10d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java @@ -98,8 +98,8 @@ public abstract class VideoPlayer extends BasePlayer //////////////////////////////////////////////////////////////////////////*/ public static final int DEFAULT_CONTROLS_DURATION = 300; // 300 millis - public static final int DEFAULT_CONTROLS_HIDE_TIME = 2000; // 2 Seconds - public static final int DPAD_CONTROLS_HIDE_TIME = 7000; // 7 Seconds + public static final int DEFAULT_CONTROLS_HIDE_TIME = 2000; // 2 seconds + public static final int DPAD_CONTROLS_HIDE_TIME = 5000; // 5 seconds protected static final int RENDERER_UNAVAILABLE = -1;