Add Justin.tv support

This commit is contained in:
calzoneman 2013-05-17 14:39:58 -04:00
parent 79ec535358
commit 66fbbb77ce
7 changed files with 51 additions and 2 deletions

View file

@ -500,6 +500,8 @@ function parseVideoURL(url){
}
else if(url.indexOf("twitch.tv") != -1)
return [parseTwitch(url), "tw"];
else if(url.indexOf("justin.tv") != -1)
return [parseJustinTV(url), "jt"];
else if(url.indexOf("livestream.com") != -1)
return [parseLivestream(url), "li"];
else if(url.indexOf("ustream.tv") != -1)
@ -544,6 +546,14 @@ function parseTwitch(url) {
return null;
}
function parseJustinTV(url) {
var m = url.match(/justin\.tv\/([a-zA-Z0-9]+)/);
if(m) {
return m[1];
}
return null;
}
function parseLivestream(url) {
var m = url.match(/livestream\.com\/([a-zA-Z0-9]+)/);
if(m) {