From a62bf7ea4c19c264f06fed5c3e3073da5ffb251d Mon Sep 17 00:00:00 2001 From: TreetopFlyer Date: Wed, 27 Apr 2022 16:37:53 -0400 Subject: [PATCH] simpler init, added fllback (classic) --- app.classic.js | 27 +++++++++++++++++++++++++++ app.js | 7 +++++-- index.html | 4 +--- 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 app.classic.js diff --git a/app.classic.js b/app.classic.js new file mode 100644 index 0000000..400ef9e --- /dev/null +++ b/app.classic.js @@ -0,0 +1,27 @@ +import 'https://js.boxcast.com/v3.min.js'; + +const Channels = { + Basics: "sfz7ja3rlpoous6usu8a", + Sunday: "gzahmhugrzogttfdtbjj", + Dev: "r3os2zfdnhlquhuypgtp" +}; + +const Player = boxcast("#boxcast"); +Player.loadChannel(Channels.Basics, +{ + showTitle: true, + showDescription: true, + showRelated: true, + showDocuments: true, + showIndex :true, + showDonations: false, + showCountdown: true, + relatedBroadcastsQuery: + { + s: "starts_at", + l: 100, + q: "timeframe:next starts_at:[2022-04-01T00:00:00 TO 2022-06-01T00:00:00]" + }, + autoplay: true, + defaultVideo: "next", +}); \ No newline at end of file diff --git a/app.js b/app.js index bbfdd2b..2bc4d29 100644 --- a/app.js +++ b/app.js @@ -424,5 +424,8 @@ const DateParse = (inDateString) => return obj; }; -/** @type {(inChannel:string, inSelector:string)=>void} */ -export default (inChannel, inSelector) => createRoot(document.querySelector(inSelector)).render(h(App, {channel:inChannel, interval:5000})); \ No newline at end of file +/** @type {(inChannel:string, inSelector:string, inInterval:number)=>void} */ +const Init = (inChannel, inSelector, inInterval) => createRoot(document.querySelector(inSelector)).render(h(App, {channel:inChannel, interval:inInterval})); + +const Channel = { Basics: "sfz7ja3rlpoous6usu8a", Sunday: "gzahmhugrzogttfdtbjj", Dev: "r3os2zfdnhlquhuypgtp" }; +Init(Channel.Basics, "#boxcast", 5000); \ No newline at end of file diff --git a/index.html b/index.html index 518e180..86f57e4 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,7 @@