Ability to distinguish native music app playback from browser's video playback

I'm using BTT's Play/Pause, Previous, Next action with keyboard shortcut to control my music playback on spotify. It's been working great, but I think the way it handles playbacks from multiple sources could be improved.
Whenever I'm listening to music but want to watch a video on Youtube, I'd naturally use my "Play/Pause" shortcut to pause my music and watch the video. However, the Play/Pause shortcut plays/pauses my video playback instead of the background music. Now that the playback is focused on the video playback, I lose control of the Spotify app that's playing in the background.
Hence, I request a shortcut to scan and control playback of a background app, rather than the most recently focused one.

if you are using google chrome you can change the behavior by going to chrome://flags

I’m currently not at my Mac but the option is called something with „media“ in it.

Otherwise you can use the „send shortcut to specific app action“, but you’d need to check the „bring to front“ checkbox first.

That works! The option's name was "Hardware Media Key Handling."
Thanks!

Thanks for this info. Chrome no longer shows up on "Now Playing".
How do you stop media control on Safari? I turned on developer menu but couldn't stop it...

For others who want to skip songs as apple music running background, simply follow these 2 steps:

  1. disable "Hardware Media Key Handling" on chrome read above for description
  2. mac media forwarder http://milgra.com/mac-media-key-forwarder.html
    This runs fine on Catalina.

You need both otherwise it won't work.