Skip to content

Commit

Permalink
Merge pull request #5331 from mbarashkov/hardware-keyboard-space-shor…
Browse files Browse the repository at this point in the history
…tcut

In Fullscreen playback, toggle play/pause with hardware space button
  • Loading branch information
Redirion committed Jan 7, 2021
2 parents 68175c1 + 9071061 commit 6b2f084
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1891,8 +1891,10 @@ public void onFullscreenStateChanged(final boolean fullscreen) {

if (fullscreen) {
hideSystemUiIfNeeded();
viewPager.setVisibility(View.GONE);
} else {
showSystemUi();
viewPager.setVisibility(View.VISIBLE);
}

if (relatedStreamsLayout != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,11 @@ public boolean onKeyDown(final int keyCode) {
switch (keyCode) {
default:
break;
case KeyEvent.KEYCODE_SPACE:
if (isFullscreen) {
onPlayPause();
}
break;
case KeyEvent.KEYCODE_BACK:
if (DeviceUtils.isTv(service) && isControlsVisible()) {
hideControls(0, 0);
Expand Down

0 comments on commit 6b2f084

Please sign in to comment.