Git Product home page Git Product logo

youtube-video's Introduction

YoutubeVideo

Intro

A Javascript library to access the WebM (and other) streams for Youtube Videos.

This is a little script we've extracted from http://omgig.com to directly access the WebM (and other formats) streams for Youtube Videos.

Dependencies

  • jQuery

Usage

var youtubeId = "Q4-MnX5PfO8";
YoutubeVideo(youtubeId, function(video){
  console.log(video.title);
  var webm = video.getSource("video/webm", "medium");
  console.log("WebM: " + webm.url);
  var mp4 = video.getSource("video/mp4", "medium");
  console.log("MP4: " + mp4.url);

  $("<video controls='controls'/>").attr("src", webm.url).appendTo("body");
});

youtube-video's People

Contributors

jwagener avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube-video's Issues

Small issue with the documentation example

On the README example the sources of the videos are saved on variables on webmUrl and mp4Url and tested as the src attribute of a video tag. But webmUrl and mp4Url returns objects, with webmUrl.url and mp4Url.url actually returning the source url string.

It is a small issue, but worth nothing. Confused me for a second when I was trying out the library.

Callback function not executing

Been using the library perfectly for a while. Today the callback function is not being called. omgig.com is experimenting similar issue. Did something change youtube-side?

Chrome issue with HTTP protocol when retrieving file location from ID

In the first few lines of $youtube-video/youtube-video.js the initial URL value is hard-coded and the youtube video Id is appended to the string as follows:

url: "http://www.youtube.com/get_video_info?video_id=" + id

Chrome policies seem to have blocked the use of this protocol for some types of requests. This can be overcome by just changing it to "https". This might be easily overcome with a try/catch of some sort, but I have not tested it.

Thank you for this project! It was very helpful for me!

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.