Remove references to defunct services

Imgur discontinued support for albums
SmashCast/Hitbox disappeared
Ustream was sunset by IBM
Mixer is dead
Picasa is long dead
Vidme is long dead
IE11 is dead
This commit is contained in:
Xaekai 2022-01-19 05:30:00 -08:00
parent 34e2130ce6
commit e1c7b76650
10 changed files with 7 additions and 146 deletions

View File

@ -20,9 +20,6 @@ var order = [
'livestream.com.coffee',
'custom-embed.coffee',
'rtmp.coffee',
'smashcast.coffee',
'ustream.coffee',
'imgur.coffee',
'hls.coffee',
'twitchclip.coffee',
'update.coffee'

View File

@ -1,12 +0,0 @@
window.ImgurPlayer = class ImgurPlayer extends EmbedPlayer
constructor: (data) ->
if not (this instanceof ImgurPlayer)
return new ImgurPlayer(data)
@load(data)
load: (data) ->
data.meta.embed =
tag: 'iframe'
src: "https://imgur.com/a/#{data.id}/embed"
super(data)

View File

@ -1,12 +0,0 @@
window.SmashcastPlayer = class SmashcastPlayer extends EmbedPlayer
constructor: (data) ->
if not (this instanceof SmashcastPlayer)
return new SmashcastPlayer(data)
@load(data)
load: (data) ->
data.meta.embed =
src: "https://www.smashcast.tv/embed/#{data.id}"
tag: 'iframe'
super(data)

View File

@ -3,7 +3,6 @@ TYPE_MAP =
vi: VimeoPlayer
dm: DailymotionPlayer
gd: GoogleDrivePlayer
gp: VideoJSPlayer
fi: FilePlayer
sc: SoundCloudPlayer
li: LivestreamPlayer
@ -11,9 +10,6 @@ TYPE_MAP =
tv: TwitchPlayer
cu: CustomEmbedPlayer
rt: RTMPPlayer
hb: SmashcastPlayer
us: UstreamPlayer
im: ImgurPlayer
hl: HLSPlayer
sb: StreamablePlayer
tc: TwitchClipPlayer

View File

@ -1,12 +0,0 @@
window.UstreamPlayer = class UstreamPlayer extends EmbedPlayer
constructor: (data) ->
if not (this instanceof UstreamPlayer)
return new UstreamPlayer(data)
@load(data)
load: (data) ->
data.meta.embed =
tag: 'iframe'
src: "https://www.ustream.tv/embed/#{data.id}?html5ui"
super(data)

View File

@ -158,11 +158,14 @@ PlaylistModule.prototype.load = function (data) {
}
} else if (item.media.type === "gd") {
delete item.media.meta.gpdirect;
} else if (["vm", "jw", "mx", "im"].includes(item.media.type)) {
} else if (["vm", "jw", "mx", "im", "gp", "us", "hb"].includes(item.media.type)) {
// JW has been deprecated for a long time
// VM shut down in December 2017
// Mixer shut down in July 2020
// Dunno when imgur album embeds stopped working but they don't work either
// Imgur replaced albums with a feature called galleries in 2019
// Picasa shut down in 2016
// Ustream was sunset by IBM in September 2018
// SmashCast (Hitbox) seemed to just vanish November 2020
LOGGER.warn(
"Dropping playlist item with deprecated type %s",
item.media.type

View File

@ -278,47 +278,6 @@ var Getters = {
});
},
/* ustream.tv */
us: function (id, callback) {
var m = id.match(/(channel\/[^?&#]+)/);
if (m) {
id = m[1];
} else {
callback("Invalid ID", null);
return;
}
var options = {
host: "www.ustream.tv",
port: 443,
path: "/" + id,
method: "GET",
timeout: 1000
};
urlRetrieve(https, options, function (status, data) {
if(status !== 200) {
callback("Ustream HTTP " + status, null);
return;
}
/*
* Yes, regexing this information out of the HTML sucks.
* No, there is not a better solution -- it seems IBM
* deprecated the old API (or at least replaced with an
* enterprise API marked "Contact sales") so fuck it.
*/
var m = data.match(/https:\/\/www\.ustream\.tv\/embed\/(\d+)/);
if (m) {
var title = "Ustream.tv - " + id;
var media = new Media(m[1], title, "--:--", "us");
callback(false, media);
} else {
callback("Channel ID not found", null);
}
});
},
/* rtmp stream */
rt: function (id, callback) {
var title = "Livestream";
@ -391,28 +350,6 @@ var Getters = {
});
},
/* hitbox.tv / smashcast.tv */
hb: function (id, callback) {
var m = id.match(/([\w-]+)/);
if (m) {
id = m[1];
} else {
callback("Invalid ID", null);
return;
}
var title = "Smashcast - " + id;
var media = new Media(id, title, "--:--", "hb");
callback(false, media);
},
/* vid.me */
vm: function (id, callback) {
process.nextTick(
callback,
"As of December 2017, vid.me is no longer in service."
);
},
/* streamable */
sb: function (id, callback) {
if (!/^[\w-]+$/.test(id)) {
@ -439,13 +376,6 @@ var Getters = {
}
},
/* mixer.com */
mx: function (id, callback) {
process.nextTick(
callback,
"As of July 2020, Mixer is no longer in service."
);
}
};
module.exports = {

View File

@ -38,8 +38,7 @@ Media.prototype = {
scuri: this.meta.scuri,
embed: this.meta.embed,
gdrive_subtitles: this.meta.gdrive_subtitles,
textTracks: this.meta.textTracks,
mixer: this.meta.mixer
textTracks: this.meta.textTracks
}
};

View File

@ -193,14 +193,10 @@
return "https://twitch.tv/" + id;
case "rt":
return id;
case "us":
return "https://ustream.tv/channel/" + id;
case "gd":
return "https://docs.google.com/file/d/" + id;
case "fi":
return id;
case "hb":
return "https://www.smashcast.tv/" + id;
case "hl":
return id;
case "sb":
@ -218,10 +214,8 @@
switch (type) {
case "li":
case "tw":
case "us":
case "rt":
case "cu":
case "hb":
case "hl":
return true;
default:

View File

@ -38,14 +38,10 @@ function formatURL(data) {
return "https://twitch.tv/" + data.id;
case "rt":
return data.id;
case "us":
return "https://ustream.tv/channel/" + data.id;
case "gd":
return "https://docs.google.com/file/d/" + data.id;
case "fi":
return data.id;
case "hb":
return "https://www.smashcast.tv/" + data.id;
case "hl":
return data.id;
case "sb":
@ -2097,16 +2093,7 @@ function waitUntilDefined(obj, key, fn) {
fn();
}
/*
God I hate supporting IE11
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
https://caniuse.com/#search=default%20function
This would be the ideal:
function chatDialog(div, zin = "auto") {
*/
function chatDialog(div, zin) {
if(!zin){ zin = 'auto'; }
function chatDialog(div, zin = 'auto') {
var parent = $("<div/>").addClass("profile-box")
.css({
padding: "10px",
@ -3286,15 +3273,6 @@ function startQueueSpinner(data) {
}
function stopQueueSpinner(data) {
// TODO: this is a temp hack, need to replace media ID check with
// a passthrough request ID (since media ID from API is not necessarily
// the same as the URL "ID" from the user)
if (data && data.type === "us") {
data = { id: data.title.match(/Ustream.tv - (.*)/)[1] };
} else if (data && data.type === "mx") {
data = { id: data.meta.mixer.channelToken };
}
var shouldRemove = (data !== null &&
typeof data === 'object' &&
$("#queueprogress").data("queue-id") === data.id);