Latest 0.1.0
Homepage https://github.com/dangercheng/ShortMediaCache
License MIT
Platforms ios 8.0, requires ARC
Authors

A Cache Library based on AVPLayer for short video on ios, you can creat AVPlayerItem with it directly.

中文介绍

Main features

  • 1.Designed for short video, easy to access, does not encroach on business
  • 2.cache video while playing, Play directly after caching
  • 3.Support preloading, Play the next video in one second
  • 4.Automatic cache management

Installation

cocoapods

pod 'ShortMediaCache'

Usage

Normal

#import "ShortMediaResourceLoader.h"
ShortMediaResourceLoader _resourceLoader = [ShortMediaResourceLoader new];
AVPlayerItem _playerItem = [_resourceLoader playItemWithUrl:videoUrl]; 
AVPlayer _player = [AVPlayer playerWithPlayerItem:_playerItem];

tips: should hold the _resourceLoader object.

Preloading

[[ShortMediaManager shareManager] resetPreloadingWithMediaUrls:preloadUrls];

tips:’preloadUrls’ is an array with video urls

More detail

The source code

License

MIT

Latest podspec

{
    "name": "ShortMediaCache",
    "version": "0.1.0",
    "summary": "A cache for short video while playing.",
    "homepage": "https://github.com/dangercheng/ShortMediaCache",
    "license": "MIT",
    "authors": {
        "DandJ": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dangercheng/ShortMediaCache.git",
        "tag": "0.1.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ShortMediaCache/*.{h,m}"
}

Pin It on Pinterest

Share This