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

Android TV - Enter / Back Button issue #120

Open
fegauthier opened this issue Mar 2, 2023 · 8 comments
Open

Android TV - Enter / Back Button issue #120

fegauthier opened this issue Mar 2, 2023 · 8 comments

Comments

@fegauthier
Copy link
Contributor

fegauthier commented Mar 2, 2023

Hi guys!

Is it the normal behaviour that when I press OK Button, the controls doesnt appear? Same thing when I press the back button, it doesn't do anything. When controls are show, i'm able to control it, but when it disappear, i'm not able to respawn it.

Thanks

EDIT:

Play/Pause button works and spawn the controls. Just wanted to know why the OK button doesnt

@fegauthier
Copy link
Contributor Author

Web events seems to override some event of the view itself.

@jepiqueau
Copy link
Collaborator

@fegauthier When you are on TV you do not need to see the controls as you are using the TV remote controller. So there is only five keys which are taken by the listener:

  • DPAD_RIGHT fast forward
  • DPAD_LEFT rewind
  • DPAD_CENTER play/pause
  • MEDIA_FAST_FORWARD fast forward speed 2
  • KEYCODE_MEDIA_REWIND rewind speed 2

"Web events seems to override some event of the view itself." i do not understand what you mean

@fegauthier
Copy link
Contributor Author

@fegauthier When you are on TV you do not need to see the controls as you are using the TV remote controller. So there is only five keys which are taken by the listener:

  • DPAD_RIGHT fast forward
  • DPAD_LEFT rewind
  • DPAD_CENTER play/pause
  • MEDIA_FAST_FORWARD fast forward speed 2
  • KEYCODE_MEDIA_REWIND rewind speed 2

"Web events seems to override some event of the view itself." i do not understand what you mean

I'm testing on a Fire Stick 4K stick at the moment. I put a console.log on keypress in my Web App. If I pressed the right button. Nothing happen in the ExoPlayer, But I see my console.log in the web console.

@fegauthier
Copy link
Contributor Author

image

If you look at my breakpoints, every key that I press on my controller don't trigger this event. I never get into these breakpoints.

@Aymkdn
Copy link

Aymkdn commented Apr 21, 2023

@fegauthier did you make any progress about it? I'm confused about how to handle the button pressed with this video player...

@fegauthier
Copy link
Contributor Author

@fegauthier did you make any progress about it? I'm confused about how to handle the button pressed with this video player...

I did. Event seems to be trigger on the webview instead of the ExoPlayer. So I added an event listener in the web view and I call capacitor method to trigger some actions on the ExoPlayer.

@Aymkdn
Copy link

Aymkdn commented Apr 21, 2023

OK, thanks, it helps.

And, by any chance, did you find how to exit/close the player when using the Back Button?

@fegauthier
Copy link
Contributor Author

OK, thanks, it helps.

And, by any chance, did you find how to exit/close the player when using the Back Button?

If you look at the PR I did #121

I added new functions. One of them is exitPlayer. So I call this function when I press backbutton.

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

No branches or pull requests

3 participants