An easy way to add cache for AVPlayer.
- Cache http streaming data For AVPlayer
- Support both audio & video http streaming (except m3u or other playlist format, e.g. HTTP Live Streaming, take a look at this post)
- Byte range access & cache
- Simple API
- Cache management
Drag the folder named AVPlayerCacheSupport into your project.
Before
AVPlayerItem *item = [AVPlayerItem playerItemWithURL:url];
self.player = [[AVPlayer alloc] initWithPlayerItem:playerItem];
Now, with cache support
#import "AVPlayerItem+MCCacheSupport.h"
AVPlayerItem *item = [AVPlayerItem mc_playerItemWithRemoteURL:url];
self.player = [[AVPlayer alloc] initWithPlayerItem:playerItem];
- iOS 7.0+ or MacOSX 10.9+
MIT
Sitting on WWDC 2015 sample code AVFoundationQueuePlayer-iOS.