Skip to content

VideoCache is an AVPlayerItem Cache library written in Swift.

License

Notifications You must be signed in to change notification settings

appssemble/VideoCache

 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 94.4%
  • Objective-C 4.8%
  • Ruby 0.8%