Skip to content

A Javascript library to access webm, mp4 sources for Youtube Videos.

Notifications You must be signed in to change notification settings

peterschmiz/youtube-video

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 webmUrl = video.getSource("video/webm", "medium");
  console.log("WebM: " + webmUrl);
  var mp4Url = video.getSource("video/mp4", "medium");
  console.log("MP4: " + mp4Url);

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

About

A Javascript library to access webm, mp4 sources for Youtube Videos.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published