Skip to content
An easy way to add cache for AVPlayer.
Branch: master
Clone or download
Latest commit 9a11ca3 Jun 5, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
AVPlayerCacheSupport save write file Jun 5, 2017
Demo remove cache file May 18, 2016
README.md update readme May 5, 2016

README.md

AVPlayerCacheSupport

An easy way to add cache for AVPlayer.

Features

  • 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

Install

Drag the folder named AVPlayerCacheSupport into your project.

Usage

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];

Requries

  • iOS 7.0+ or MacOSX 10.9+

License

MIT

Demo

Sitting on WWDC 2015 sample code AVFoundationQueuePlayer-iOS.

You can’t perform that action at this time.