Skip to content

Commit e588abd

Browse files
authored
Restore handling SPACE as play-pause only in fullscreen
When not in fullscreen SPACE should be not handled by the player, and hence result in a scroll down
1 parent 2934841 commit e588abd

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/Player.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3752,9 +3752,12 @@ public boolean onKeyDown(final int keyCode) {
37523752
default:
37533753
break;
37543754
case KeyEvent.KEYCODE_SPACE:
3755-
playPause();
3756-
if (isPlaying()) {
3757-
hideControls(0, 0);
3755+
if (isFullscreen) {
3756+
playPause();
3757+
if (isPlaying()) {
3758+
hideControls(0, 0);
3759+
}
3760+
return true;
37583761
}
37593762
break;
37603763
case KeyEvent.KEYCODE_BACK:

app/src/main/java/org/schabi/newpipe/player/playback/PlayerMediaSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public MediaDescriptionCompat getQueueMetadata(final int index) {
8888
@Override
8989
public void play() {
9090
player.play();
91+
// hide the player controls even if the play command came from the media session
9192
player.hideControls(0, 0);
9293
}
9394

0 commit comments

Comments
 (0)