Skip to content

yiplee/YPAVAssetResourceLoader

Repository files navigation

YPAVAssetResourceLoader

CI Status Version License Platform

YPAVAssetResourceLoader A lightweight AVAssetResourceLoaderDelegate implementation for short streaming media. It will cache all receiving data when playing and reuse the data next time.

  • cache media data
  • seek support (todo)

Requirements

Xcode 9 & iOS 8

Installation

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

pod 'YPAVAssetResourceLoader'

Usage

#import <YPAVAssetResourceLoader/YPAVPlayerResourceLoader.h>

NSURL *url = [NSURL URLWithString:@"http://www.yiplee.com/example.mp4"];
AVAsset *asset = [AVURLAsset assetWithYPResourceURL:url];
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:asset];

An YPAVPlayerResourceLoader instance is not designed to power mutiple asset URLs at the same time.

Always create new YPAVPlayerResourceLoader when needed.

License

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

About

A lightweight AVAssetResourceLoaderDelegate implementation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published