-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
feat: Add global hotkey support #8906
base: main
Are you sure you want to change the base?
Conversation
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
f021ba3
to
461bab0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8906 +/- ##
==========================================
- Coverage 83.25% 83.23% -0.02%
==========================================
Files 120 120
Lines 8097 8106 +9
Branches 1944 1947 +3
==========================================
+ Hits 6741 6747 +6
- Misses 1356 1359 +3 ☔ View full report in Codecov by Sentry. |
This could use some tests. Especially to cover cases where the a keypress on other elements shouldn't trigger the action. |
Hi @mister-ben sorry for getting back to you late. Yes I agree. I tried to add a test and wanted to run locally to check the test but I couldn't figure out how to run the specific test in isolation. Is there a specific command we can use so we can just tell test file path and line number? The only thing I have is a way to run the whole test suite. This is not practical when writing the test. |
If you change |
Description
The video player does not currently support global hotkeys. Hotkeys only work when we have focus on the player. This PR is to introduce global hotkey support.
With this change, for example, if you land on the page with a video player, and does not have focus on any specific fields like form fields or the video player, you can perform a hotkey event like space bar key press which will play/pause video.
Specific Changes proposed
Global hotkeys are not turned on by default. To turn on, need to set
userActions.globalHotkeys
option totrue
. As below:Requirements Checklist
npm run docs:api
to error