carlin-q-scott / browser-media-keys

Lets you control many web players using the media keys on your keyboard.
Mozilla Public License 2.0
123 stars 31 forks source link

When firefox is open, extension only focuses media commands on Firefox, no other applications #104

Open FearlessPotatoKing opened 7 years ago

FearlessPotatoKing commented 7 years ago

On Linux (Angergos Linux 64bit-Cinnamon Desktop) when I have Firefox open at the same times as another media player application like Spotify, Audacity, or Banshee the media keys don't work with those other applications. Even if I don't have any tabs open that have any media content in them.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39737197-when-firefox-is-open-extension-only-focuses-media-commands-on-firefox-no-other-applications?utm_campaign=plugin&utm_content=tracker%2F7600490&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F7600490&utm_medium=issues&utm_source=github).
norswap commented 7 years ago

Same thing on macOS (Sierra), the media keys only affect Firefox, even if minimized and the other player is focused.

Tested with both Clementine and iTunes.

Worse, even when the tab containing the playable media is closed, the media keys still don't work for the other media apps. This seems to become the case as soon as the media keys are used to control Firefox. If you restart Firefox but do not open any media, you can use the media keys with the other apps again.

Minimal suggested fix: restore the initial state whenever there are no playable media open.

A better solution would be to let the focused app handle the keys if it can, but I'm not sure that's doable.