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

pull/5331/head
Mikhail Barashkov 2021-01-01 23:23:59 +02:00
rodzic 16c44f3a30
commit 907106156f
2 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

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

Wyświetl plik

@ -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);