FWAudioPlayerDataSource

@protocol FWAudioPlayerDataSource <NSObject>

@optional

/// Asks the data source to return the number of items that FWAudioPlayer would play
- (NSInteger)audioPlayerNumberOfItems;

/// Source URL provider, support NSURL|AVURLAsset|AVPlayerItem
- (nullable id)audioPlayerURLForItemAtIndex:(NSInteger)index preBuffer:(BOOL)preBuffer;

/// Source URL provider, would excute until you call setupPlayerItemWithURL:index:
- (void)audioPlayerLoadItemAtIndex:(NSInteger)index preBuffer:(BOOL)preBuffer;

@end

Undocumented

  • Asks the data source to return the number of items that FWAudioPlayer would play

    Declaration

    Objective-C

    - (NSInteger)audioPlayerNumberOfItems;
  • Source URL provider, support NSURL|AVURLAsset|AVPlayerItem

    Declaration

    Objective-C

    - (nullable id)audioPlayerURLForItemAtIndex:(NSInteger)index
                                      preBuffer:(BOOL)preBuffer;
  • Source URL provider, would excute until you call setupPlayerItemWithURL:index:

    Declaration

    Objective-C

    - (void)audioPlayerLoadItemAtIndex:(NSInteger)index preBuffer:(BOOL)preBuffer;