cheshire137 / soma-chrome

Chrome extension to listen to SomaFM web radio stations from your browser.
https://chrome.google.com/webstore/detail/somaplayer/dpcghdgbhjkihgnnbojldhjmcbieofgo?hl=en&gl=US&authuser=1
MIT License
58 stars 20 forks source link

Show station and song in tooltip #34

Open kapsi1 opened 7 years ago

cheshire137 commented 7 years ago

I'm trying this out locally now. Thanks!

cheshire137 commented 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.

kapsi1 commented 7 years ago

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.