Skip to content

Instantly share code, notes, and snippets.

@superbarne
Created June 6, 2013 14:01
Show Gist options
  • Save superbarne/5721724 to your computer and use it in GitHub Desktop.
Save superbarne/5721724 to your computer and use it in GitHub Desktop.
Streams youtube videos directly to the browser like a proxy
var ytdl = require('ytdl')
function stream(req,res,id) {
var dl = ytdl('http://www.youtube.com/watch?v='+id, {
quality:43 //poor quality leave empty for good quality
})
dl.pipe(res);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment