Mac 多媒體快捷鍵:BeardedSpice

jopen 9年前發布 | 9K 次閱讀 Objective-C開發 BeardedSpice

Bearded Spice 允許你使用 Mac 鍵盤上的多媒體快捷鍵控制基于 Web 的多媒體播放器(比如 SoundCloud,油Tube 等等)和一些原生應用。

BeardedSpice 特性:智能模式,自動更新,快捷鍵等等。

Mac 多媒體快捷鍵:BeardedSpice

Mac 多媒體快捷鍵:BeardedSpice

多媒體策略:

@interface MediaStrategy : NSObject
/**
Returns name of that media stratery. 
*/
-(NSString *) displayName; // Required override in subclass.
/**
Checks tab that it is accepted this strategy.
*/
-(BOOL) accepts:(TabAdapter *)tab; // Required override in subclass.
/**
Checks tab that it is in the playback state.
*/
- (BOOL)isPlaying:(TabAdapter *)tab;
/**
Returns track information object from tab.
*/
- (Track *)trackInfo:(TabAdapter *)tab;
/**
Returns javascript code of the play/pause toggle.
*/
-(NSString *) toggle; // Required override in subclass.
/**
Returns javascript code of the previous track action.
*/
-(NSString *) previous;
/**
Returns javascript code of the next track action.
*/
-(NSString *) next;
/**
Returns javascript code of the pausing action.
Used mainly for pausing before switching active tabs.
*/
-(NSString *) pause; // Required override in subclass.
/**
Returns javascript code of the "favorite" toggle.
*/
-(NSString *) favorite;
/**
Helper method for obtaining album artwork from url string
*/
- (NSImage *)imageByUrlString:(NSString *)urlString;
@end

項目主頁:http://www.baiduhome.net/lib/view/home/1442543872883

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!