Skip to content
A Javascript library to access webm, mp4 sources for Youtube Videos.
CoffeeScript HTML
Branch: master
Clone or download
This branch is even with therealtakeshi:master.

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vendor
README.md
test.coffee
test.html
youtube-video.coffee
youtube-video.js

README.md

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");
});
You can’t perform that action at this time.