If you use media keys on your keyboard to control Spotify or any other installed media software, you may notice that these keys stopped working when you're watching YouTube on Chrome web browser.
This is because Chrome 74 added functionality to control YouTube and other websites to take advantage of these keys using Media Session API. So when you start watching a YouTube video, media keys only controls the video and not Spotify. In other words, Chrome blocks other apps from using media keys. This may become an issue when you want to stop the music with media keys to hear the sound of the video.
Therefore this new feature doesn't make life easier if you frequently listen to music on your computer.
Block Chrome from taking over media keys
The option for disabling hardware media key handling is hidden under a Chrome flag. Flags are experimental features that may disappear any time (but we hope this one will stay).
- Copy and paste chrome://flags/#hardware-media-key-handling to address bar (F6 will select address bar). This will scroll the page to right flag.
- Set Hardware Media Key Handling to Disabled.
- A restart of Chrome will be required.
Note that media keys won't work on Chrome anymore, even if you have nothing playing at the background. To restore the default setting, change the status of the flag to Default or Enabled.