-
Notifications
You must be signed in to change notification settings - Fork 855
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
[BUG] How Autofocus? Keyboard like arrows and 'f' don't work unless I click on the video first #1033
Comments
I'm on Web, and have autoplay turned on, so it plays without first clicking the widget, but it doesn't have focus so keyboard events don't work. |
FINALLY CREATED A SOLUTION FOR FOCUS ISSUE!!!! inject focus releaser which runs for evey youtube frame i think like below : where _controller is YoutubePlayerController. Now the focus is released to window not the flutter i think.
NOW VERY IMP NOTE : You may ask why do _controller.webViewController.runJavaScript('window.focus();); if i am injecting a listener in html dom? Because the listener will be there but the YouTube player will steal the DOM focus and listner wont listen anything unless the focus is released back. I havent tried the in flutter keyboard listener after this fix so do post results if anyone tries that. |
Is there an existing issue for this?
Package
youtube_player_iframe (Default)
What happened?
keyboard shortcuts don't work unless video is clicked
What is the expected behaviour?
should be autofocusable.
How to reproduce?
use it
Flutter Doctor Output
The text was updated successfully, but these errors were encountered: