-
-
Notifications
You must be signed in to change notification settings - Fork 290
Disable Media Keys with MediaSession on Windows #1207
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
139402a to
05fe607
Compare
05fe607 to
7e17e1b
Compare
7e17e1b to
13b0165
Compare
13b0165 to
03d41ef
Compare
03d41ef to
dab358d
Compare
dab358d to
406b4ab
Compare
406b4ab to
e7f809f
Compare
|
Just like the kids in school Lint didn't wanna play ball with me, but we made it... Should work now. Since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check Review
e7f809f to
7380a9a
Compare
src/renderer/features/settings/components/hotkeys/window-hotkey-settings.tsx
Outdated
Show resolved
Hide resolved
src/renderer/features/settings/components/hotkeys/window-hotkey-settings.tsx
Outdated
Show resolved
Hide resolved
src/renderer/features/settings/components/hotkeys/window-hotkey-settings.tsx
Outdated
Show resolved
Hide resolved
src/renderer/features/settings/components/hotkeys/window-hotkey-settings.tsx
Outdated
Show resolved
Hide resolved
7380a9a to
33182d4
Compare
33182d4 to
94f8032
Compare
HardwareMediaKeyHandling94f8032 to
867c4e2
Compare
867c4e2 to
a267cef
Compare
In f07393c we enabled the MediaSession API, which from Chromium's side brings its own native way of handling Global Media Keys. However, it turns out having this enabled seemingly conflicts with Windows 11's SMTC implementation when we also bind the Media Keys using Electron's Global Hotkeys API (Windows 10 is apparently fine, but now EOL). Globally passing `HardwareMediaKeyHandling` to `disable-features` was considered, however using the MediaSession API requires `HardwareMediaKeyHandling` to be enabled, so this is not an option. Instead, with MediaSession enabled we need to let Chromium handle the Media Keys, while without MediaSession we bind our own Global Hot Keys for users that have them enabled in the settings. Co-Authored-By: Xudong Zhou <godzmichael@outlook.com>
a267cef to
5836304
Compare
In f07393c we enabled the MediaSession API, which from Chromium's side brings its own native way of handling Global Media Keys. However, it turns out having this enabled seemingly conflicts with Windows 11's SMTC implementation when we also bind the Media Keys using Electron's Global Hotkeys API (Windows 10 is apparently fine, but now EOL).
Globally passing
HardwareMediaKeyHandlingtodisable-featureswas considered, however using the MediaSession API requiresHardwareMediaKeyHandlingto be enabled, so this is not an option.Instead, with MediaSession enabled we need to let Chromium handle the Media Keys, while without MediaSession we bind our own Global Hot Keys for users that have them enabled in the settings.
Fixes #1189
Previous Fix attempt for posterity
In f07393c this was gated behind whether or not the mediaSession API was enabled. However, it turns out having this enabled seemingly conflicts with Windows 11's SMTC implementation and/or Electron's global hotkey API.
So instead we always pass
HardwareMediaKeyHandlinglike we used to, and only make theMediaSessionServiceconditional.Note: Untested because I don't have a Windows install, but given that it was passed for the past 2+ years, it should be fine.