Skip to content

Commit

Permalink
When in Fullscreen playback mode, toggle play/pause with the hardware…
Browse files Browse the repository at this point in the history
… Space button.
  • Loading branch information
Mikhail Barashkov committed Jan 7, 2021
1 parent 16c44f3 commit 9071061
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 9071061

Please sign in to comment.