When in Fullscreen playback mode, toggle play/pause with the hardware Space button.
This commit is contained in:
parent
16c44f3a30
commit
907106156f
2 changed files with 7 additions and 0 deletions
|
@ -1891,8 +1891,10 @@ public final class VideoDetailFragment
|
||||||
|
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
hideSystemUiIfNeeded();
|
hideSystemUiIfNeeded();
|
||||||
|
viewPager.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
showSystemUi();
|
showSystemUi();
|
||||||
|
viewPager.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relatedStreamsLayout != null) {
|
if (relatedStreamsLayout != null) {
|
||||||
|
|
|
@ -505,6 +505,11 @@ public class VideoPlayerImpl extends VideoPlayer
|
||||||
switch (keyCode) {
|
switch (keyCode) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
case KeyEvent.KEYCODE_SPACE:
|
||||||
|
if (isFullscreen) {
|
||||||
|
onPlayPause();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case KeyEvent.KEYCODE_BACK:
|
case KeyEvent.KEYCODE_BACK:
|
||||||
if (DeviceUtils.isTv(service) && isControlsVisible()) {
|
if (DeviceUtils.isTv(service) && isControlsVisible()) {
|
||||||
hideControls(0, 0);
|
hideControls(0, 0);
|
||||||
|
|
Loading…
Reference in a new issue