boxcast-playlist/index.html

59 lines
1.1 KiB
HTML
Raw Normal View History

2022-04-22 16:56:41 -04:00
<!DOCTYPE html>
<html>
<head></head>
<body>
2022-04-25 10:36:55 -04:00
<div style="max-width:500px; margin: 0 auto;">
<div id="boxcast-player"></div>
<div id="boxcast-playlist"></div>
</div>
2022-04-22 16:56:41 -04:00
<script type="module">
import 'https://js.boxcast.com/v3.min.js';
const Channel = {
Basics: "sfz7ja3rlpoous6usu8a",
Sunday: "gzahmhugrzogttfdtbjj",
Dev: "r3os2zfdnhlquhuypgtp"
};
2022-04-25 10:36:55 -04:00
2022-04-22 16:56:41 -04:00
const Player = boxcast("#boxcast-player");
2022-04-25 10:36:55 -04:00
Player.loadChannel(Channel.Sunday,
2022-04-22 16:56:41 -04:00
{
showTitle: true,
showDescription: true,
showCountdown: true,
//selectedBroadcastId: "yo8sefnnejvw3cx3vhup",
2022-04-25 10:36:55 -04:00
showRelated: true,
relatedBroadcastsQuery:{l: 3},
/*
relatedBroadcastsQuery:
{
s: "starts_at",
l: 100,
q: "timeframe:next starts_at:[2022-04-01T00:00:00 TO 2022-06-01T00:00:00]"
},
*/
2022-04-22 16:56:41 -04:00
onLoadBroadcast: console.log,
autoplay: true,
defaultVideo: "next"
});
2022-04-25 10:36:55 -04:00
2022-04-22 16:56:41 -04:00
import { h, html, render } from "https://esm.sh/htm/preact";
import App from "./app.js";
render(
2022-04-25 10:36:55 -04:00
h(App, {player:Player, channel:Channel.Basics, interval:50000}),
2022-04-22 16:56:41 -04:00
document.querySelector("#boxcast-playlist")
);
2022-04-25 10:36:55 -04:00
2022-04-22 16:56:41 -04:00
</script>
</body>
</html>