chrome-media-keys
chrome-media-keys copied to clipboard
Chrome extension that adds media keys to most web music players
The extension can be installed from the Chrome Web Store here
Building
Ensure grunt-cli is installed on the system
npm install -g grunt-cli
Install the npm packages for this project
npm install # In the project directory
Run grunt
grunt run
If you see a ENOENT error, make sure imagemagick is installed
npm install imagemagick
Adding a new service
If you are the owner of a service, you can implement support directly in your site. This is far more stable. See http://sway.fm/api
-
Create a new controller. In src/controllers, you can see examples of many existing controllers.
-
You'll most likely want to copy BasicTemplate.js and fill in the blanks. You won't need values for everything, some fields are redundant. For example you won't need
playPauseSelector
andplaySelector
, just one or the other, depending on if the play and pause button are separate elements. -
Add controller to src/background/mappings.coffee. This will match the domain of the player to the controller file you just wrote.
That's it.
License
The source files for this extension are made available under the AGPLv3 license.
A copy of the text of the license can be found in LICENSE.txt