Skip to content

Instantly share code, notes, and snippets.

View nmuldoon's full-sized avatar

Nicholas Muldoon nmuldoon

View GitHub Profile
@adammw
adammw / gist:11135063
Created April 21, 2014 07:30
PBS Video Extractor
// PBS Video Extractor
(function () {
var getVideoUrl = function (id, fn) {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://video.pbs.org/video/' + id + '.smil');
xhr.responseType = 'document';
xhr.onload = function () {
var videos = Array.prototype.slice.call(xhr.response.querySelectorAll('video'), 0);
videos.sort(function (a, b) {