GithubHelp home page GithubHelp logo

lixiaodongdg / vimediacache Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vitoziv/vimediacache

0.0 1.0 0.0 134 KB

Cache media file while play media using AVPlayer

License: MIT License

Ruby 0.67% Objective-C 99.33%

vimediacache's Introduction

VIMediaCache

中文说明

Cache media file while play media using AVPlayerr.

VIMediaCache use AVAssetResourceLoader to control AVPlayer download media data.

CocoaPods

pod 'VIMediaCache'

Usage

Objective C

NSURL *url = [NSURL URLWithString:@"https://mvvideo5.meitudata.com/571090934cea5517.mp4"];
VIResourceLoaderManager *resourceLoaderManager = [VIResourceLoaderManager new];
self.resourceLoaderManager = resourceLoaderManager;
AVPlayerItem *playerItem = [resourceLoaderManager playerItemWithURL:url];
AVPlayer *player = [AVPlayer playerWithPlayerItem:playerItem];

Swift

let url = URL(string: "https://mvvideo5.meitudata.com/571090934cea5517.mp4")
let resourceLoaderManager = VIResourceLoaderManager()
let playerItem = resourceLoaderManager.playerItem(with: url)
let player = AVPlayer(playerItem: playerItem)

Contact

[email protected]

License

MIT

vimediacache's People

Contributors

vitoziv avatar kelaking avatar smhjsw avatar kim4apple avatar satishvekariya avatar ceekay1991 avatar cp-satish-v avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.