Latest 1.0.0
Homepage https://github.com/czqasngit/Labrador
License MIT
Platforms ios 9.0
Frameworks AudioToolbox
Authors

Version
License
Platform

timg

A complete audio player with a modular design that can be replaced with different components to suit different needs. A decoder and two data providers have been implemented
一个完整的音频播放器,采用了组件化的设计,可按需要替换不同的组件以适应不同的需求。目前已经实现了一个解码器和两个数据提供器

Labrador3

Extensions

1.The decoder can use FFmpeg to support more formats
2.Data provider can be based on Samba with FTP or more
1.解码器可以使用FFmpeg来支持更多格式
2.Data提供程序可以基于Samba和FTP或更多

Futues

1.Local file play
2.Network stream play and cache
3.Segmentation cache

1.本地文件播放
2.网络文件播放
3.分段缓存

Usage(Objective-C)

- (IBAction)play:(id)sender {
    if(_player) {
        [_player prepare] ;
    return;
    }
    _player = [[LabradorHTTPAudioPlayer alloc] initWithURLString:@""] ;
//    _player = [[LabradorLocalAudioPlayer alloc] init] ;
    _player.delegate = self ;
    [_player prepare] ;
}
- (IBAction)pause:(id)sender {
    [_player pause] ;
}
- (IBAction)resume:(id)sender {
    [_player resume] ;
}

- (IBAction)stop:(id)sender {
    [_player stop] ;
}
- (void)labradorAudioPlayerPrepared:(LabradorAudioPlayer *)player ;
- (void)labradorAudioPlayerWithError:(NSError *)error player:(LabradorAudioPlayer *)player ;
- (void)labradorAudioPlayerDidFinishPlaying:(LabradorAudioPlayer *)player successfully:(BOOL)successfully ;
- (void)labradorAudioPlayerPlaying:(LabradorAudioPlayer *)player playTime:(float)playTime ;
- (void)labradorAudioPlayerCachingPercent:(LabradorAudioPlayer *)player percent:(float)percent ;
- (void)labradorAudioPlayerLoading:(LabradorAudioPlayer *)player ;
- (void)labradorAudioPlayerResumePlayFromLoading:(LabradorAudioPlayer *)player ;

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

Labrador is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Labrador'

Author

czqasn, [email protected]om

License

Labrador is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Labrador",
    "version": "1.0.0",
    "summary": "[AudioPlayer, AudioQueue,Stream]Labrador is a complete stream/file audio player.",
    "description": "A complete audio player with a modular design that can be replaced with different components to suit different needs. A decoder and two data providers have been implemented",
    "homepage": "https://github.com/czqasngit/Labrador",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "czqasngit": "[email protected]"
    },
    "source": {
        "git": "https://github.com/czqasngit/Labrador.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Labrador/Classes/**/*",
    "public_header_files": "Labrador/Classes/**/*.h",
    "frameworks": "AudioToolbox"
}

Pin It on Pinterest

Share This