Giter VIP home page Giter VIP logo

youku-parse's Introduction

Youku-parse

An angular directive for parsing youku video id into real mp4 urls.

Deprecated

This codebase is no longer usable since the algorithm source in MAMA2 [https://github.com/zythum/mama2/blob/master/src/seeker_youku.js] is no longer working.

Last Update

Last update the algorithm on 2016 Nov 29th. Functional test on 2016 Nov 29th, worked well. Added the cross domain support using jsonp.

Source

All the parse functions are from MAMA2 https://github.com/zythum/mama2/blob/master/src/seeker_youku.js.

I just did the wrapping for angular.

Usage

  • Inject the module

      angular.module('YourModule','windht.youku')
    
  • Use the service!

      angular.controller('YourCtrl',[Youku,function(Youku){
        Youku.getVideoSrc(anyVideoID).then(function(url){
            // Maybe directly use this url to load a video! No ads!
            angular.element('ChooseAPlayer!').attr('src',url);
        });
      }])
    
  • Or directly and simply use a nice directive

      <video youku youku-id="XOTY1MjQ2OTc2"></video>
    
  • Or You may want to do dynamic loading

      //place a video with "youku" attr
      <video youku></video>
    
      angular.controller('YourCtrl',function($rootScope){
      	var vid;
        	$rootScope.$broadcast("$video.update",vid)
        	// broadcast the vid
      })
    
  • And there you go!

  • Check the demo!

Updating

In case of any change of the parsing functions, this service will update in a periodically of one months. Post any issues for hurry update.

youku-parse's People

Contributors

windht avatar yummyuuu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.