Coder Social home page Coder Social logo

ebelair / rmyoutubeextractor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from runmad/rmyoutubeextractor

0.0 0.0 0.0 97 KB

iOS library that extracts MP4 URLs when provided a YouTube video identifier.

License: MIT License

Ruby 3.66% Objective-C 96.34%

rmyoutubeextractor's Introduction

RMYouTubeExtractor

RMYouTubeExtractor provides an easy way to obtain MP4 URLs for your iOS apps by providing a YouTube video identifier.

This library borrows code from XCDYouTubeVideoPlayerViewController by Cédric Luthi - sans the MPMoviePlayerController, allowing you to just extract the URLs and roll your own player.

Requirements

  • iOS 7 (uses NSURLSession)
  • ARC

Installation

CocoaPods

pod “RMYouTubeExtractor”

then

$ pod install

Submodule / manually

  1. Add RMYouTubeExtractor.h and RMYouTubeExtractor.m to your project
  2. @import AVFoundation;

Usage

[[RMYouTubeExtractor sharedInstance] extractVideoForIdentifier:youtubeID
                                                    completion:^(NSDictionary *videoDictionary, NSError *error) {
                                                        }];

The instance returns a dictionary with up to 4 video qualities: 240p, 360p, 720p and 1080p. 1080p is rare.

Don’t forget to check for empty dictionary / errors.

Demo project

See demo project for an example of how to use the extractor.

##Credit

Developed by Rune Madsen (@runmad and runmad.com).

Credit to Cédric Luthi for his work on extraction code.

##Feedback

I appreciate feedback. Create Github issues, pull requests or connect with me on Twitter.

I'd love to see and hear from you if you use it in a project.

License

RMYouTubeExtractor is available under the MIT license. See the LICENSE file for more information.

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.