feishin/src/main/features/core/player
Tarulia a9af1e91d4
Disable Media Keys with MediaSession on Windows (#1207)
In f07393c8 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>
2025-10-21 21:48:09 -07:00
..
index.ts log -> error, remove unnecesary logs 2025-06-26 21:17:59 -07:00
media-keys.ts Disable Media Keys with MediaSession on Windows (#1207) 2025-10-21 21:48:09 -07:00