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

keyboardShortcuts not working #1

Open
sp4rkiop opened this issue Nov 6, 2024 · 4 comments
Open

keyboardShortcuts not working #1

sp4rkiop opened this issue Nov 6, 2024 · 4 comments

Comments

@sp4rkiop
Copy link

sp4rkiop commented Nov 6, 2024

keyboardShortcuts: {
const SingleActivator(LogicalKeyboardKey.keyH): () {
debugPrint('arrow right button pressed');
_player.seek(_currentPosition + Duration(seconds: 10));
},
},

    works if i use MaterialDesktop controls but not with MateriaTv
@LNA-DEV
Copy link
Member

LNA-DEV commented Nov 6, 2024

Yes I removed them because I feared they interfere with the Focus handling. Do you really need them on TV?

@LNA-DEV
Copy link
Member

LNA-DEV commented Nov 6, 2024

But I think we could add them back in around here:

onKeyEvent: (node, event) {

I may take a closer look in a few days

@sp4rkiop
Copy link
Author

sp4rkiop commented Nov 7, 2024

great!. btw yesterday i was debuging your player.dart and found that PlatformGlobals.isTv was the issue due to which MaterialDesktopVideoControlsTheme controls were opening and i was not able to navigate widgets. my emulator was android 10 tv 1080p (upto my understanding the emulator launcher has not updated and is still to default android tv launcher so 'android.software.leanback' is not detected there. we are developing almost same thing so i will work on your platform_globals.dart to make it backward compatible too. I am actively working on my code for player, its controls and settings menu for television devices, will share you player.dart when i am done with it.

EDIT: Finally done with changes and also found that i was not doing await PlatformGlobals.setGlobals(); in main.dart therefore every bool was false for me. My player is complete for mobile/web (was already) now done with androidTv aswell. Thanks for creating the package. Much appreciated.

@sp4rkiop
Copy link
Author

sp4rkiop commented Nov 7, 2024

But I think we could add them back in around here:

onKeyEvent: (node, event) {

I may take a closer look in a few days

I don't think we need this anymore in near future maybe as already the navigation to buttons are working well. Thanks for addressing btw. also feel free to close this.

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

2 participants