I believe the operating system should handle determining which media player has "focus"? For example, I play music on iTunes and Spotify, and can control both with media shortcuts depending on which is being used in the background.
This Firefox fix allows Firefox to behave like any other app.