diff --git a/bin/build-player.js b/bin/build-player.js index f9832247..db4112de 100755 --- a/bin/build-player.js +++ b/bin/build-player.js @@ -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' diff --git a/player/imgur.coffee b/player/imgur.coffee deleted file mode 100644 index 2753a3b8..00000000 --- a/player/imgur.coffee +++ /dev/null @@ -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) diff --git a/player/smashcast.coffee b/player/smashcast.coffee deleted file mode 100644 index f7345526..00000000 --- a/player/smashcast.coffee +++ /dev/null @@ -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) diff --git a/player/update.coffee b/player/update.coffee index 4601949c..8faefd2f 100644 --- a/player/update.coffee +++ b/player/update.coffee @@ -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 diff --git a/player/ustream.coffee b/player/ustream.coffee deleted file mode 100644 index 1ec899bb..00000000 --- a/player/ustream.coffee +++ /dev/null @@ -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) diff --git a/src/channel/playlist.js b/src/channel/playlist.js index 649e4912..e27658a3 100644 --- a/src/channel/playlist.js +++ b/src/channel/playlist.js @@ -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 diff --git a/src/get-info.js b/src/get-info.js index be79ddfb..acdaa0df 100644 --- a/src/get-info.js +++ b/src/get-info.js @@ -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 = { diff --git a/src/media.js b/src/media.js index 6829f7c9..40c0dd12 100644 --- a/src/media.js +++ b/src/media.js @@ -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 } }; diff --git a/src/utilities.js b/src/utilities.js index 7561f897..66bb251d 100644 --- a/src/utilities.js +++ b/src/utilities.js @@ -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: diff --git a/www/js/util.js b/www/js/util.js index 5db5cffb..ca9ecda8 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -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 = $("
").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);