Enable play/pause with space key even when not in fullscreen player

This commit is contained in:
ktprograms 2021-11-03 08:26:13 +08:00
parent 34ab93c9bd
commit 2934841152
1 changed files with 3 additions and 5 deletions

View File

@ -3752,12 +3752,10 @@ public final class Player implements
default: default:
break; break;
case KeyEvent.KEYCODE_SPACE: case KeyEvent.KEYCODE_SPACE:
if (isFullscreen) {
playPause(); playPause();
if (isPlaying()) { if (isPlaying()) {
hideControls(0, 0); hideControls(0, 0);
} }
}
break; break;
case KeyEvent.KEYCODE_BACK: case KeyEvent.KEYCODE_BACK:
if (DeviceUtils.isTv(context) && isControlsVisible()) { if (DeviceUtils.isTv(context) && isControlsVisible()) {