Skip to content

LWAudioPlayer,一个双核心音频播放器,包含前进、后退、循环等进度控制,并支持倍数播放。

License

Notifications You must be signed in to change notification settings

luowei/LWAudioPlayer

Repository files navigation

LWAudioPlayer

CI Status Version License Platform

Example

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

Bundle Image

#define LWImageBundle(obj)  ([NSBundle bundleWithPath:[[NSBundle bundleForClass:[obj class]] pathForResource:@"LWAudioPlayer" ofType:@"bundle"]] ?: ([NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"LWAudioPlayer " ofType:@"bundle"]] ?: [NSBundle mainBundle]))
#define UIImageWithName(name,obj) ([UIImage imageNamed:name inBundle:LWImageBundle(obj) compatibleWithTraitCollection:nil])

LWAudioPlayerView

self.audioPlayerView = [LWAudioPlayerView new];
self.audioPlayerView.dataSource = self;
[self.view addSubview:self.audioPlayerView];
[self.audioPlayerView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.right.bottom.equalTo(self.view);
    make.height.mas_equalTo(75);
}];

Requirements

Installation

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

pod 'LWAudioPlayer'

Carthage

github "luowei/LWAudioPlayer"

Usage

    self.audioPlayerView = [LWAudioPlayerView new];
    self.audioPlayerView.dataSource = self;
    [self.view addSubview:self.audioPlayerView];
    [self.audioPlayerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(75);
    }];


#pragma mark - LWAudioPlayerDataSource

//获得播放列表,扁平化的ItemList
-(NSArray <ListItem *>*)flatItemList:(NSArray <ListItem *>*)itemList withType:(NSString *)type {
    //todo: 列表数据
    return nil;
}

Author

luowei, luowei@wodedata.com

License

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

About

LWAudioPlayer,一个双核心音频播放器,包含前进、后退、循环等进度控制,并支持倍数播放。

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages