Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiplee/ypavassetresourceloader
A lightweight AVAssetResourceLoaderDelegate implementation.
https://github.com/yiplee/ypavassetresourceloader
avassetresourceloaderdelegate
Last synced: about 6 hours ago
JSON representation
A lightweight AVAssetResourceLoaderDelegate implementation.
- Host: GitHub
- URL: https://github.com/yiplee/ypavassetresourceloader
- Owner: yiplee
- License: mit
- Created: 2017-12-08T05:59:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T06:19:55.000Z (almost 7 years ago)
- Last Synced: 2024-10-31T16:29:02.876Z (16 days ago)
- Topics: avassetresourceloaderdelegate
- Language: Objective-C
- Size: 50.8 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YPAVAssetResourceLoader
[![CI Status](http://img.shields.io/travis/yiplee/YPAVAssetResourceLoader.svg?style=flat)](https://travis-ci.org/yiplee/YPAVAssetResourceLoader)
[![Version](https://img.shields.io/cocoapods/v/YPAVAssetResourceLoader.svg?style=flat)](http://cocoapods.org/pods/YPAVAssetResourceLoader)
[![License](https://img.shields.io/cocoapods/l/YPAVAssetResourceLoader.svg?style=flat)](http://cocoapods.org/pods/YPAVAssetResourceLoader)
[![Platform](https://img.shields.io/cocoapods/p/YPAVAssetResourceLoader.svg?style=flat)](http://cocoapods.org/pods/YPAVAssetResourceLoader)```YPAVAssetResourceLoader``` A lightweight AVAssetResourceLoaderDelegate implementation for short streaming media.
It will cache all receiving data when playing and reuse the data next time.- [x] cache media data
- [ ] seek support (todo)## Requirements
Xcode 9 & iOS 8
## Installation
YPAVAssetResourceLoader is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'YPAVAssetResourceLoader'
```## Usage
```objc
#importNSURL *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.