mirror of https://github.com/calzoneman/sync.git
Remove JustinTV support as it is no longer in service
This commit is contained in:
parent
735b2fcd07
commit
dc3efd94c8
|
@ -575,20 +575,6 @@ var Getters = {
|
||||||
callback(false, media);
|
callback(false, media);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* justin.tv */
|
|
||||||
jt: function (id, callback) {
|
|
||||||
var m = id.match(/([\w-]+)/);
|
|
||||||
if (m) {
|
|
||||||
id = m[1];
|
|
||||||
} else {
|
|
||||||
callback("Invalid ID", null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var title = "Justin.tv - " + id;
|
|
||||||
var media = new Media(id, title, "--:--", "jt");
|
|
||||||
callback(false, media);
|
|
||||||
},
|
|
||||||
|
|
||||||
/* ustream.tv */
|
/* ustream.tv */
|
||||||
us: function (id, callback) {
|
us: function (id, callback) {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -251,8 +251,6 @@
|
||||||
return "http://livestream.com/" + id;
|
return "http://livestream.com/" + id;
|
||||||
case "tw":
|
case "tw":
|
||||||
return "http://twitch.tv/" + id;
|
return "http://twitch.tv/" + id;
|
||||||
case "jt":
|
|
||||||
return "http://justin.tv/" + id;
|
|
||||||
case "rt":
|
case "rt":
|
||||||
return id;
|
return id;
|
||||||
case "jw":
|
case "jw":
|
||||||
|
@ -274,7 +272,6 @@
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "li":
|
case "li":
|
||||||
case "tw":
|
case "tw":
|
||||||
case "jt":
|
|
||||||
case "us":
|
case "us":
|
||||||
case "rt":
|
case "rt":
|
||||||
case "cu":
|
case "cu":
|
||||||
|
|
|
@ -628,55 +628,6 @@ var TwitchTVPlayer = function (data) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var JustinTVPlayer = function (data) {
|
|
||||||
removeOld();
|
|
||||||
var self = this;
|
|
||||||
self.videoId = data.id;
|
|
||||||
self.videoLength = data.seconds;
|
|
||||||
self.init = function () {
|
|
||||||
var prto = location.protocol;
|
|
||||||
var url = "http://www.justin.tv/widgets/live_embed_player.swf?channel="+self.videoId;
|
|
||||||
var params = {
|
|
||||||
allowFullScreen: "true",
|
|
||||||
allowScriptAccess: "always",
|
|
||||||
allowNetworking: "all",
|
|
||||||
movie: "http://www.justin.tv/widgets/live_embed_player.swf",
|
|
||||||
id: "live_embed_player_flash",
|
|
||||||
flashvars: "hostname=www.justin.tv&channel="+self.videoId+"&auto_play=true&start_volume=" + VOLUME
|
|
||||||
};
|
|
||||||
swfobject.embedSWF(url,
|
|
||||||
"ytapiplayer",
|
|
||||||
VWIDTH, VHEIGHT,
|
|
||||||
"8",
|
|
||||||
null, null,
|
|
||||||
params,
|
|
||||||
{}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
self.load = function (data) {
|
|
||||||
self.videoId = data.id;
|
|
||||||
self.videoLength = data.seconds;
|
|
||||||
self.init();
|
|
||||||
};
|
|
||||||
|
|
||||||
self.pause = function () { };
|
|
||||||
|
|
||||||
self.play = function () { };
|
|
||||||
|
|
||||||
self.getTime = function () { };
|
|
||||||
|
|
||||||
self.seek = function () { };
|
|
||||||
|
|
||||||
self.getVolume = function () { };
|
|
||||||
|
|
||||||
self.setVolume = function () { };
|
|
||||||
|
|
||||||
waitUntilDefined(window, "swfobject", function () {
|
|
||||||
self.init();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
function rtmpEventHandler(id, ev, data) {
|
function rtmpEventHandler(id, ev, data) {
|
||||||
if (ev === "volumechange") {
|
if (ev === "volumechange") {
|
||||||
PLAYER.volume = (data.muted ? 0 : data.volume);
|
PLAYER.volume = (data.muted ? 0 : data.volume);
|
||||||
|
@ -1236,7 +1187,6 @@ var constructors = {
|
||||||
"sc": SoundcloudPlayer,
|
"sc": SoundcloudPlayer,
|
||||||
"li": LivestreamPlayer,
|
"li": LivestreamPlayer,
|
||||||
"tw": TwitchTVPlayer,
|
"tw": TwitchTVPlayer,
|
||||||
"jt": JustinTVPlayer,
|
|
||||||
"us": UstreamPlayer,
|
"us": UstreamPlayer,
|
||||||
"jw": JWPlayer,
|
"jw": JWPlayer,
|
||||||
"im": ImgurPlayer,
|
"im": ImgurPlayer,
|
||||||
|
|
|
@ -46,8 +46,6 @@ function formatURL(data) {
|
||||||
return "http://livestream.com/" + data.id;
|
return "http://livestream.com/" + data.id;
|
||||||
case "tw":
|
case "tw":
|
||||||
return "http://twitch.tv/" + data.id;
|
return "http://twitch.tv/" + data.id;
|
||||||
case "jt":
|
|
||||||
return "http://justin.tv/" + data.id;
|
|
||||||
case "rt":
|
case "rt":
|
||||||
return data.id;
|
return data.id;
|
||||||
case "jw":
|
case "jw":
|
||||||
|
@ -1234,13 +1232,6 @@ function parseMediaLink(url) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if((m = url.match(/justin\.tv\/([^&#]+)/))) {
|
|
||||||
return {
|
|
||||||
id: m[1],
|
|
||||||
type: "jt"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if((m = url.match(/livestream\.com\/([^\?&#]+)/))) {
|
if((m = url.match(/livestream\.com\/([^\?&#]+)/))) {
|
||||||
return {
|
return {
|
||||||
id: m[1],
|
id: m[1],
|
||||||
|
|
Loading…
Reference in New Issue