Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always hide controls if video is playing [Android TV] #3537

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/schabi/newpipe/player/VideoPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down