Restore handling SPACE as play-pause only in fullscreen
When not in fullscreen SPACE should be not handled by the player, and hence result in a scroll down
This commit is contained in:
parent
2934841152
commit
e588abd4e7
2 changed files with 7 additions and 3 deletions
|
@ -3752,10 +3752,13 @@ public final class Player implements
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_SPACE:
|
case KeyEvent.KEYCODE_SPACE:
|
||||||
|
if (isFullscreen) {
|
||||||
playPause();
|
playPause();
|
||||||
if (isPlaying()) {
|
if (isPlaying()) {
|
||||||
hideControls(0, 0);
|
hideControls(0, 0);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_BACK:
|
case KeyEvent.KEYCODE_BACK:
|
||||||
if (DeviceUtils.isTv(context) && isControlsVisible()) {
|
if (DeviceUtils.isTv(context) && isControlsVisible()) {
|
||||||
|
|
|
@ -88,6 +88,7 @@ public class PlayerMediaSession implements MediaSessionCallback {
|
||||||
@Override
|
@Override
|
||||||
public void play() {
|
public void play() {
|
||||||
player.play();
|
player.play();
|
||||||
|
// hide the player controls even if the play command came from the media session
|
||||||
player.hideControls(0, 0);
|
player.hideControls(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue