GithubHelp home page GithubHelp logo

mdeora / fycachedurlasset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from factorialcomplexity/fycachedurlasset

0.0 1.0 0.0 24.62 MB

Enhanced AVURLAsset with seamless cache layer

Home Page: https://www.factorialcomplexity.com/

License: MIT License

Objective-C 91.85% Ruby 1.38% Shell 6.77%

fycachedurlasset's Introduction

FYCachedURLAsset

Version License Platform

It's enhanced AVURLAsset with seamless cache layer. It handles the playing of an audio/video file while streaming and simultaneuosly saving downloaded data to a local URL. FYCachedURLAsset was designed to prevent download the same bytes twice.

Installation

Manual:
Add to your project source files from FYCachedURLAsset folder

CocoaPods:
FYCachedURLAsset is available through CocoaPods. To install it, add the following line to your Podfile:

pod 'FYCachedURLAsset'

How to use

FYCachedURLAsset is a replacement for [AVURLAsset URLAssetWithURL:URL options:nil], but with additional local file path argument

NSString *cacheFilePath = [documentsPath stringByAppendingPathComponent:[URL lastPathComponent]];

FYCachedURLAsset *asset = [FYCachedURLAsset cachedURLAssetWithURL:URL cacheFilePath:cacheFilePath];

Features

  • supports streaming of media file, so it can be playbacked as soon as first data is available
  • simultaneously saves all downloaded data to a file during streaming
  • gracefully handles interruptions and resumes download only from place where was stopped
  • supports ETag header attribute to skip file download if no changes were made on the remote file from the last time
  • allows to seek stream to any place, but with limited cache support

License

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

Example

To run the example project, clone the repo, and run pod install from the Example directory, open workspace file and run.

screenshot screenshot

fycachedurlasset's People

Contributors

ku6opr avatar wicharek avatar

Watchers

 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.