appssemble / VideoCache

VideoCache is an AVPlayerItem Cache library written in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VideoCache

VideoCache is an AVPlayerItem Cache library written in Swift.

Example

// import
import VideoCache

// setup
VideoCacheManager.logLevel = .error
VideoCacheManager.default.capacityLimit = Int64(1).GB
.
.
.
// cache all
let playerItem = AVPlayerItem(remote: url, cacheKey: <#special key for this media or nil#>)
let player = AVPlayer(playerItem: playerItem)
.
.
// cache 0~1024, 2048~4096
let playerItem = AVPlayerItem(remote: url, cacheKey: <#special key for this media or nil#>, cacheRanges: [0...1024, 2048...4096])
let player = AVPlayer(playerItem: playerItem)

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate VideoCache into your Xcode project using Carthage, specify it in your Cartfile:

github "SoalHuang/VideoCache"

Author

Reference

License

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

About

VideoCache is an AVPlayerItem Cache library written in Swift.

License:MIT License


Languages

Language:Swift 94.4%Language:Objective-C 4.8%Language:Ruby 0.8%