Fixup Livestream.com

This commit is contained in:
Xaekai 2022-01-24 04:38:15 -08:00 committed by Calvin Montgomery
parent 16f183c117
commit 8774dc89e7
3 changed files with 11 additions and 11 deletions

View file

@ -6,11 +6,12 @@ window.LivestreamPlayer = class LivestreamPlayer extends EmbedPlayer
@load(data)
load: (data) ->
[ account, event ] = data.id.split(';')
data.meta.embed =
src: "https://cdn.livestream.com/embed/#{data.id}?\
layout=4&\
color=0x000000&\
iconColorOver=0xe7e7e7&\
iconColor=0xcccccc"
src: "https://livestream.com/accounts/#{account}/events/#{event}/player?\
enableInfoAndActivity=false&\
defaultDrawer=&\
autoPlay=true&\
mute=false"
tag: 'iframe'
super(data)

View file

@ -216,14 +216,12 @@ var Getters = {
/* livestream.com */
li: function (id, callback) {
var m = id.match(/([\w-]+)/);
if (m) {
id = m[1];
} else {
if (!id.match(/^\d+;\d+$/)) {
callback("Invalid ID", null);
return;
}
var title = "Livestream.com - " + id;
var title = "Livestream.com";
var media = new Media(id, title, "--:--", "li");
callback(false, media);
},

View file

@ -33,7 +33,8 @@ function formatURL(data) {
case "sc":
return data.id;
case "li":
return "https://livestream.com/" + data.id;
const [account,event] = data.id.split(';');
return `https://livestream.com/accounts/${account}/events/${event}`;
case "tw":
return "https://twitch.tv/" + data.id;
case "rt":