Open kapsi1 opened 7 years ago
The play/pause button now updates when the popup is open and I hit the media key. 👍
A concern I have is that having the extension enabled seems to eat my media key even if Chrome is not focused. Is there a way to have it only listen for play/pause when Chrome has focus? Otherwise it's annoying that I can have my browser open as well as Spotify and play/pause doesn't control Spotify, but instead starts playing whatever Soma station I was previously listening to.
If Chrome doesn't have support for requiring focus before consuming the play/pause press, maybe make media key support an optional thing that the user can toggle in the options page.
I asked about that on Stack Overflow, and sadly it's impossible to make the global/local switch in options: http://stackoverflow.com/questions/39674768/enabling-and-disabling-chrome-commands/39703922
You can disable the global attribute if you want. It will be local to Chrome then. For me it's pointless since if I have to switch to browser, I can as well click the pause button (though you can do alt+tab and use media key without touching the mouse). And as you said, the user can change or disable keyboard shortcuts anyway. It's up to you.
I'm trying this out locally now. Thanks!