1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-06-26 07:03:20 +00:00

When in Fullscreen playback mode, toggle play/pause with the hardware Space button.

This commit is contained in:
Mikhail Barashkov 2021-01-01 23:23:59 +02:00
parent 16c44f3a30
commit 907106156f
2 changed files with 7 additions and 0 deletions

View File

@ -1891,8 +1891,10 @@ public final class VideoDetailFragment
if (fullscreen) {
hideSystemUiIfNeeded();
viewPager.setVisibility(View.GONE);
} else {
showSystemUi();
viewPager.setVisibility(View.VISIBLE);
}
if (relatedStreamsLayout != null) {

View File

@ -505,6 +505,11 @@ public class VideoPlayerImpl extends VideoPlayer
switch (keyCode) {
default:
break;
case KeyEvent.KEYCODE_SPACE:
if (isFullscreen) {
onPlayPause();
}
break;
case KeyEvent.KEYCODE_BACK:
if (DeviceUtils.isTv(service) && isControlsVisible()) {
hideControls(0, 0);