From f081bc782adba074052884995b90bc77dcef3338 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 26 Jul 2020 10:24:36 -0700 Subject: [PATCH] RIP Mixer --- bin/build-player.js | 1 - config.template.yaml | 3 --- package.json | 2 +- player/mixer.coffee | 12 ------------ player/update.coffee | 3 --- src/channel/playlist.js | 3 ++- src/config.js | 10 ---------- src/get-info.js | 22 ++++------------------ www/js/util.js | 2 ++ 9 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 player/mixer.coffee diff --git a/bin/build-player.js b/bin/build-player.js index d16e0b42..2de0ebc9 100755 --- a/bin/build-player.js +++ b/bin/build-player.js @@ -25,7 +25,6 @@ var order = [ 'imgur.coffee', 'gdrive-youtube.coffee', 'hls.coffee', - 'mixer.coffee', 'twitchclip.coffee', 'update.coffee' ]; diff --git a/config.template.yaml b/config.template.yaml index a315ec78..48ac57de 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -207,8 +207,5 @@ service-socket: # https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup twitch-client-id: null -# Mixer Client ID (https://mixer.com/lab) -mixer-client-id: null - poll: max-options: 50 diff --git a/package.json b/package.json index 4bb5337c..b4a126bc 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.70.5", + "version": "3.71.0", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/player/mixer.coffee b/player/mixer.coffee deleted file mode 100644 index d4ce5e2c..00000000 --- a/player/mixer.coffee +++ /dev/null @@ -1,12 +0,0 @@ -window.MixerPlayer = class MixerPlayer extends EmbedPlayer - constructor: (data) -> - if not (this instanceof MixerPlayer) - return new MixerPlayer(data) - - @load(data) - - load: (data) -> - data.meta.embed = - src: "https://mixer.com/embed/player/#{data.meta.mixer.channelToken}" - tag: 'iframe' - super(data) diff --git a/player/update.coffee b/player/update.coffee index a72c85f7..4601949c 100644 --- a/player/update.coffee +++ b/player/update.coffee @@ -5,7 +5,6 @@ TYPE_MAP = gd: GoogleDrivePlayer gp: VideoJSPlayer fi: FilePlayer - jw: FilePlayer sc: SoundCloudPlayer li: LivestreamPlayer tw: TwitchPlayer @@ -15,12 +14,10 @@ TYPE_MAP = hb: SmashcastPlayer us: UstreamPlayer im: ImgurPlayer - vm: VideoJSPlayer hl: HLSPlayer sb: StreamablePlayer tc: TwitchClipPlayer cm: VideoJSPlayer - mx: MixerPlayer window.loadMediaPlayer = (data) -> try diff --git a/src/channel/playlist.js b/src/channel/playlist.js index 4c0477c0..b398e7f7 100644 --- a/src/channel/playlist.js +++ b/src/channel/playlist.js @@ -159,9 +159,10 @@ PlaylistModule.prototype.load = function (data) { } } else if (item.media.type === "gd") { delete item.media.meta.gpdirect; - } else if (["vm", "jw"].includes(item.media.type)) { + } else if (["vm", "jw", "mx"].includes(item.media.type)) { // JW has been deprecated for a long time // VM shut down in December 2017 + // Mixer shut down in July 2020 LOGGER.warn( "Dropping playlist item with deprecated type %s", item.media.type diff --git a/src/config.js b/src/config.js index 1a6bb498..c6f2bdb8 100644 --- a/src/config.js +++ b/src/config.js @@ -407,16 +407,6 @@ function preprocessConfig(cfg) { "for more information on registering a client ID"); } - if (cfg["mixer-client-id"]) { - require("cytube-mediaquery/lib/provider/mixer").setClientID( - cfg["mixer-client-id"] - ); - } else { - LOGGER.warn("No Mixer Client ID set. Mixer.com links will " + - "not work. See mixer-client-id in config.template.yaml " + - "for more information on registering a client ID"); - } - // Remove calzoneman from contact config (old default) cfg.contacts = cfg.contacts.filter(contact => { return contact.name !== 'calzoneman'; diff --git a/src/get-info.js b/src/get-info.js index 25bca7ce..d19be127 100644 --- a/src/get-info.js +++ b/src/get-info.js @@ -9,7 +9,6 @@ const Vimeo = require("cytube-mediaquery/lib/provider/vimeo"); const Streamable = require("cytube-mediaquery/lib/provider/streamable"); const TwitchVOD = require("cytube-mediaquery/lib/provider/twitch-vod"); const TwitchClip = require("cytube-mediaquery/lib/provider/twitch-clip"); -const Mixer = require("cytube-mediaquery/lib/provider/mixer"); import { Counter } from 'prom-client'; import { lookup as lookupCustomMetadata } from './custom-media'; @@ -546,23 +545,10 @@ var Getters = { /* mixer.com */ mx: function (id, callback) { - let m = id.match(/^[\w-]+$/); - if (!m) { - process.nextTick(callback, "Invalid mixer.com ID"); - return; - } - - Mixer.lookup(id).then(stream => { - process.nextTick(callback, null, new Media( - stream.id, - stream.title, - "--:--", - "mx", - stream.meta - )); - }).catch(error => { - process.nextTick(callback, error.message || error, null); - }); + process.nextTick( + callback, + "As of July 2020, Mixer is no longer in service." + ); } }; diff --git a/www/js/util.js b/www/js/util.js index 38a60561..52e73dbc 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1409,6 +1409,7 @@ function parseMediaLink(url) { }; } + // Deprecated as of December 2017 if ((m = url.match(/vid\.me\/embedded\/([\w-]+)/)) || (m = url.match(/vid\.me\/([\w-]+)/))) { return { @@ -1431,6 +1432,7 @@ function parseMediaLink(url) { }; } + // Deprecated as of July 2020 if ((m = url.match(/\bmixer\.com\/([\w-]+)/))) { return { id: m[1],