-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparams.json
1 lines (1 loc) · 6.44 KB
/
params.json
1
{"name":"BeardedSpice","tagline":"Mac Media Keys for the Masses","body":"# About\r\n\r\n[](images/bs.jpg)\r\n\r\nBeardedSpice is a menubar application for Mac OSX that allows you to control web based media players with the media keys found on Mac keyboards. It is an extensible application that works with Chrome and Safari, and can control any tab with an applicable media player. BeardedSpice currently supports:\r\n\r\n- [22Tracks](http://22tracks.com)\r\n- [8Tracks](http://8tracks.com)\r\n- [Amazon Music](https://amazon.com/gp/dmusic/cloudplayer/player)\r\n- [AudioMack](http://www.audiomack.com/)\r\n- [BandCamp](http://bandcamp.com)\r\n- [BeatsMusic](http://listen.beatsmusic.com)\r\n- [Bop.fm](http://bop.fm)\r\n- [Chorus](http://wiki.xbmc.org/index.php?title=Add-on:Chorus)\r\n- [Deezer](http://deezer.com)\r\n- [focus@will](https://www.focusatwill.com)\r\n- [Google Music](https://play.google.com/music/)\r\n- [GrooveShark](http://grooveshark.com)\r\n- [HypeMachine](http://hypem.com)\r\n- [Last.fm](http://last.fm)\r\n- [Mixcloud](http://mixcloud.com)\r\n- [Music Unlimited](https://music.sonyentertainmentnetwork.com)\r\n- [Overcast.fm](https://overcast.fm)\r\n- [Pandora](http://pandora.com)\r\n- [Pocket Casts](https://play.pocketcasts.com/)\r\n- [Rdio](http://rdio.com)\r\n- [Shuffler.fm](http://shuffler.fm/tracks)\r\n- [Slacker](http://slacker.com)\r\n- [Songza](http://songza.com)\r\n- [SoundCloud](https://soundcloud.com)\r\n- [Spotify (Web)](https://play.spotify.com)\r\n- [STITCHER](http://www.stitcher.com)\r\n- [Synology](http://synology.com)\r\n- [TIDAL](http://listen.tidalhifi.com/)\r\n- [XboxMusic](http://music.xbox.com)\r\n- [Yandex Music](http://music.yandex.ru)\r\n- [YouTube](http://youtube.com)\r\n- [VK (\"My Music\" from vk.com)](http://vk.com)\r\n- [Vimeo](http://vimeo.com)\r\n\r\nIf you want another supported app supported, simply open an issue with the tag 'app support'. Or, if you are feeling extra feisty, implement the handler yourself!\r\n\r\nBeardedSpice is built with [SPMediaKeyTap](https://github.com/nevyn/SPMediaKeyTap) and works well with other applications listening to media key events.\r\n\r\n## Dependencies\r\n\r\nWe use [CocoaPods](http://cocoapods.org/) to manage all obj-c/cocoa dependences. Install them locally using:\r\n```bash\r\nsudo gem install cocoapods\r\npod setup\r\npod install\r\n```\r\n\r\n*Always* use BeardedSpice.xcworkspace for development, *not* BeardedSpice.xcodeproject\r\n\r\n## Features\r\n\r\n### Setting an active tab\r\nTell BeardedSpice to control a tab by either clicking the menubar icon and selecting a tab from the dropdown, or by pressing the 'Set Active Tab' shortcut when a browser window is active. The shortcut defaults to ⌘+F8, and is configurable in the preferences panel. Switching active tabs will pause the currently active tab (if there is one).\r\n\r\nIn Chrome you must reset your active tab if you move your tab to a new window. With Safari, reset your active tab when changing the order of your active tab or moving it to a new window.\r\n\r\n### Disabling certain handlers\r\nFrom the preferences menu, uncheck any types of webpages that you don't want BeardedSpice to have control over. By default, all implemented handlers are enabled.\r\n\r\n## Writing a Handler\r\n\r\nMedia controllers are written as [strategies](https://github.com/beardedspice/beardedspice/blob/master/BeardedSpice/MediaStrategy.h). Each strategy defines a collection of Javascript functions to be excecuted on particular webpages.\r\n\r\n```Objective-C\r\n@interface MediaStrategy : NSObject\r\n\r\n-(BOOL) accepts:(id <Tab>) tab;\r\n-(NSString *) displayName;\r\n\r\n-(NSString *) toggle;\r\n-(NSString *) previous;\r\n-(NSString *) next;\r\n-(NSString *) pause;\r\n\r\n@end\r\n```\r\n\r\nThe `accepts` method takes a `Tab` object and returns `YES` if the strategy can control the given tab. `displayName` must return a unique string describing the controller and will be used as the name shown in the Preferences panel. All other functions return a Javascript function for the particular action. `pause` is a special case and is used when changing the active tab.\r\n\r\nA sample strategy for GrooveShark:\r\n\r\n```Objective-C\r\n@implementation GrooveSharkStrategy\r\n\r\n-(id) init\r\n{\r\n self = [super init];\r\n if (self) {\r\n predicate = [NSPredicate predicateWithFormat:@\"SELF LIKE[c] '*grooveshark.com*'\"];\r\n }\r\n return self;\r\n}\r\n\r\n-(BOOL) accepts:(id <Tab>)tab\r\n{\r\n return [predicate evaluateWithObject:[tab URL]];\r\n}\r\n\r\n-(NSString *) toggle\r\n{\r\n return @\"(function(){return window.Grooveshark.togglePlayPause()})()\";\r\n}\r\n\r\n-(NSString *) previous\r\n{\r\n return @\"(function(){return window.Grooveshark.previous()})()\";\r\n}\r\n\r\n-(NSString *) next\r\n{\r\n return @\"(function(){return window.Grooveshark.next()})()\";\r\n}\r\n\r\n-(NSString *) pause\r\n{\r\n return @\"(function(){return window.Grooveshark.pause()})()\";\r\n}\r\n\r\n-(NSString *) displayName\r\n{\r\n return @\"Grooveshark\";\r\n}\r\n\r\n@end\r\n```\r\n\r\nUpdate the [`MediaStrategyRegistry`](https://github.com/beardedspice/beardedspice/blob/master/BeardedSpice/MediaStrategyRegistry.m) to include an instance of your new strategy:\r\n\r\n```Objective-C\r\n+(NSArray *) getDefaultMediaStrategies\r\n{\r\n DefaultMediaStrategies = [NSArray arrayWithObjects:\r\n // ...\r\n [[GoogleMusicStrategy alloc] init],\r\n [[RdioStrategy alloc] init],\r\n // add your new strategy!\r\n [[GrooveSharkStrategy alloc] init],\r\n nil];\r\n}\r\n```\r\n\r\nFinally, update the [default preferences plist](https://github.com/beardedspice/beardedspice/blob/master/BeardedSpice/BeardedSpiceUserDefaults.plist) to include your strategy.\r\n\r\n# Download\r\n\r\nDownload the [latest release](http://www.calm-apps.com/s/BeardedSpice.zip), or find previous released binaries [here](https://github.com/beardedspice/beardedspice/tree/releases).\r\n\r\nMac OS X 10.7 or greater required.\r\n\r\n[](https://travis-ci.org/beardedspice/beardedspice)\r\n\r\n\r\n# Contact\r\n\r\n- [@chedkid](https://twitter.com/chedkid)\r\n- [@trhodeos](https://twitter.com/trhodeos)\r\n","google":"UA-47149001-1","note":"Don't delete this file! It's used internally to help with page regeneration."}