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

Play/Pause keyboard shortcut #23

Closed skywinder closed 6 years ago

skywinder commented 8 years ago

Your extension rocks! Thanks! Hi! It would be nice to add ability to play pause radio with shortcut: https://developer.chrome.com/extensions/commands

cheshire137 commented 8 years ago

Thanks! Any suggestions for the shortcut? I haven't used shortcuts in a Chrome extension before, but I think it'd be cool to let the user set their desired shortcut via the options page, if that's possible for a dynamic shortcut in a Chrome extension.

skywinder commented 8 years ago

@moneypenny it would be awesome, if it's possible to capture "play/pause" command or set custom. Some extensions could do this (in the chrome://extensions/ -> in the bottom right "Keyboard shortcuts")

cheshire137 commented 6 years ago

I toyed with using the play/pause button as a global shortcut for this extension, but that turned out to be very annoying as if you had Chrome open at all, it would eat your play/pause presses. So I might be using the Spotify app and not SomaPlayer in Chrome, but SomaPlayer would get the play/pause instead of Spotify.

I should set different default values for play and pause in the manifest.json, since the commands are no longer global.

cheshire137 commented 6 years ago

It's not a single button press, but there are shortcuts for play/pause now: use the global shortcut to open the whole extension (defaults to Alt-S, or Option-S on macOS) then hit Space.