From 31ea44ccf1783840b27b991f4779c6c3bf7cc5f8 Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Wed, 12 May 2021 10:20:39 +0200 Subject: [PATCH] Fixed player not automatically playing (#6266) * Fixed player not automatically playing Should also fix https://github.com/TeamNewPipe/NewPipe/issues/6179 * Added comment --- app/src/main/java/org/schabi/newpipe/player/Player.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 21276b4c0..ba6521b91 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -714,7 +714,12 @@ public final class Player implements // Android TV: without it focus will frame the whole player binding.playPauseButton.requestFocus(); - playPause(); + // Note: This is for automatically playing (when "Resume playback" is off), see #6179 + if (getPlayWhenReady()) { + play(); + } else { + pause(); + } } NavigationHelper.sendPlayerStartedEvent(context); }