mirror of
https://github.com/samsonjs/media.git
synced 2026-04-05 11:15:46 +00:00
Don't pass keyboard escape key to media controller.
This makes it possible to exit the player when using e.g. an Android TV with a keyboard.
This commit is contained in:
parent
bcb4ea4f70
commit
ab489d35e9
1 changed files with 2 additions and 1 deletions
|
|
@ -151,7 +151,8 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
|
|||
root.setOnKeyListener(new OnKeyListener() {
|
||||
@Override
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE
|
||||
|| keyCode == KeyEvent.KEYCODE_MENU) {
|
||||
return false;
|
||||
}
|
||||
return mediaController.dispatchKeyEvent(event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue