Created
June 6, 2013 14:01
-
-
Save superbarne/5721724 to your computer and use it in GitHub Desktop.
Streams youtube videos directly to the browser like a proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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