Media Keys is a Chrome extension and a small app that allow you to dedicate the media keys (F7, F8, and F9) on a Mac keyboard to controlling web-based streaming services like Grooveshark. Thanks to Boris Smus for the implementation idea of using WebSockets.
- Song notifications could be useful...
- Override events sent via headsets/headphones.
Unless specified otherwise, this project will install libwebsockets to /usr/local/lib
. You can specify the location in which the compile script will look for or install libwebsockets to by changing step two (2) below to:
LWS_DYNAMIC_LIB_DIR=/some/awesome/path ./compile.sh
Just make sure that /some/awesome/path
is absolute.
git clone --recursive git://github.com/whymarrh/media-keys.git
./compile.sh
- Install the Chrome extension - see load the extension.
Definitely check out the Grooveshark API and the libwebsockets API.
It can't do that. But you can add a daemon to your system.
- Compile the server. (See above.)
- Move the compiled file somewhere you won't loose it.
- You'll need some XML. Get some here.
- Change the
/path/to/the/executable/file
to where your compiled server is. - Move the modified p-list file to
~/Library/LaunchAgents/
. - Restart the system.
ps -e | grep [m]ediakeys
and you should see the process running.- All done. The server will now run automagically on system start.
No, not when the server is running. Thus, if the server is always running (due to it starting with the system) it will always be consuming the media key events whole, all other applications will no longer work with them. You could always use something like Lingon to start the server.