RIP Mixer

This commit is contained in:
Calvin Montgomery 2020-07-26 10:24:36 -07:00
parent 99af92ed2c
commit f081bc782a
9 changed files with 9 additions and 49 deletions

View File

@ -25,7 +25,6 @@ var order = [
'imgur.coffee', 'imgur.coffee',
'gdrive-youtube.coffee', 'gdrive-youtube.coffee',
'hls.coffee', 'hls.coffee',
'mixer.coffee',
'twitchclip.coffee', 'twitchclip.coffee',
'update.coffee' 'update.coffee'
]; ];

View File

@ -207,8 +207,5 @@ service-socket:
# https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup # https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup
twitch-client-id: null twitch-client-id: null
# Mixer Client ID (https://mixer.com/lab)
mixer-client-id: null
poll: poll:
max-options: 50 max-options: 50

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "3.70.5", "version": "3.71.0",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View File

@ -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)

View File

@ -5,7 +5,6 @@ TYPE_MAP =
gd: GoogleDrivePlayer gd: GoogleDrivePlayer
gp: VideoJSPlayer gp: VideoJSPlayer
fi: FilePlayer fi: FilePlayer
jw: FilePlayer
sc: SoundCloudPlayer sc: SoundCloudPlayer
li: LivestreamPlayer li: LivestreamPlayer
tw: TwitchPlayer tw: TwitchPlayer
@ -15,12 +14,10 @@ TYPE_MAP =
hb: SmashcastPlayer hb: SmashcastPlayer
us: UstreamPlayer us: UstreamPlayer
im: ImgurPlayer im: ImgurPlayer
vm: VideoJSPlayer
hl: HLSPlayer hl: HLSPlayer
sb: StreamablePlayer sb: StreamablePlayer
tc: TwitchClipPlayer tc: TwitchClipPlayer
cm: VideoJSPlayer cm: VideoJSPlayer
mx: MixerPlayer
window.loadMediaPlayer = (data) -> window.loadMediaPlayer = (data) ->
try try

View File

@ -159,9 +159,10 @@ PlaylistModule.prototype.load = function (data) {
} }
} else if (item.media.type === "gd") { } else if (item.media.type === "gd") {
delete item.media.meta.gpdirect; 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 // JW has been deprecated for a long time
// VM shut down in December 2017 // VM shut down in December 2017
// Mixer shut down in July 2020
LOGGER.warn( LOGGER.warn(
"Dropping playlist item with deprecated type %s", "Dropping playlist item with deprecated type %s",
item.media.type item.media.type

View File

@ -407,16 +407,6 @@ function preprocessConfig(cfg) {
"for more information on registering a client ID"); "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) // Remove calzoneman from contact config (old default)
cfg.contacts = cfg.contacts.filter(contact => { cfg.contacts = cfg.contacts.filter(contact => {
return contact.name !== 'calzoneman'; return contact.name !== 'calzoneman';

View File

@ -9,7 +9,6 @@ const Vimeo = require("cytube-mediaquery/lib/provider/vimeo");
const Streamable = require("cytube-mediaquery/lib/provider/streamable"); const Streamable = require("cytube-mediaquery/lib/provider/streamable");
const TwitchVOD = require("cytube-mediaquery/lib/provider/twitch-vod"); const TwitchVOD = require("cytube-mediaquery/lib/provider/twitch-vod");
const TwitchClip = require("cytube-mediaquery/lib/provider/twitch-clip"); const TwitchClip = require("cytube-mediaquery/lib/provider/twitch-clip");
const Mixer = require("cytube-mediaquery/lib/provider/mixer");
import { Counter } from 'prom-client'; import { Counter } from 'prom-client';
import { lookup as lookupCustomMetadata } from './custom-media'; import { lookup as lookupCustomMetadata } from './custom-media';
@ -546,23 +545,10 @@ var Getters = {
/* mixer.com */ /* mixer.com */
mx: function (id, callback) { mx: function (id, callback) {
let m = id.match(/^[\w-]+$/); process.nextTick(
if (!m) { callback,
process.nextTick(callback, "Invalid mixer.com ID"); "As of July 2020, Mixer is no longer in service."
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);
});
} }
}; };

View File

@ -1409,6 +1409,7 @@ function parseMediaLink(url) {
}; };
} }
// Deprecated as of December 2017
if ((m = url.match(/vid\.me\/embedded\/([\w-]+)/)) || if ((m = url.match(/vid\.me\/embedded\/([\w-]+)/)) ||
(m = url.match(/vid\.me\/([\w-]+)/))) { (m = url.match(/vid\.me\/([\w-]+)/))) {
return { return {
@ -1431,6 +1432,7 @@ function parseMediaLink(url) {
}; };
} }
// Deprecated as of July 2020
if ((m = url.match(/\bmixer\.com\/([\w-]+)/))) { if ((m = url.match(/\bmixer\.com\/([\w-]+)/))) {
return { return {
id: m[1], id: m[1],