Merge pull request #5331 from mbarashkov/hardware-keyboard-space-shortcut
In Fullscreen playback, toggle play/pause with hardware space button
This commit is contained in:
commit
6b2f084cda
|
@ -1891,8 +1891,10 @@ public final class VideoDetailFragment
|
|||
|
||||
if (fullscreen) {
|
||||
hideSystemUiIfNeeded();
|
||||
viewPager.setVisibility(View.GONE);
|
||||
} else {
|
||||
showSystemUi();
|
||||
viewPager.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
if (relatedStreamsLayout != null) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue