Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added method to handle remote key events to show controls on any keypress #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FGMGIT
Copy link

@FGMGIT FGMGIT commented Apr 5, 2017

Added method to handle remote key events to show controls on any key event. Now is able to work properly in TV platform showing the controls and hiding again after 5 sec.

…event.

Added method to handle remote key events to show controls on any key event. Now is able to work properly in TV platform showing the controls and hiding again after 5 sec.
@@ -92,6 +92,10 @@ public void onDismiss(DialogInterface dialog) {
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
JSONObject payload = Payload.keyEvent(event);
new CallbackResponse(Player.this.callbackContext).send(PluginResult.Status.OK, payload, true);

//Added method to handle remote key events to show controls on any key event
exoView.showController();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only show ExoPlayer's controller on the bottom. We also have to support info header on the top which needs to be synchronized with the bottom controlller.

Can you take a look at onTouchListener and see if you can make it work in similar fashion?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment we are not using the info header, I was trying to implement the same method used in onTouchListener with no results. I'll come back to it when we need to use info header or when I find some time.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added after exoView.showController();
show();
show info header on key events.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkalyon @FGMGIT is this still an issue? What's the proper way to fix this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants