update bauchbinde
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Florian Sorg 2020-12-27 21:17:37 +01:00
parent 78dacff90d
commit f266d65cd9
1 changed files with 7 additions and 7 deletions

View File

@ -6,11 +6,11 @@
let headline = null; let headline = null;
let speaker = null; let speaker = null;
let isIntro = false; let isIntro = false;
let holdDuration = 4000; let holdDuration = 10;
let room = null; let room = null;
let time = null; let time = null;
let startDelay = 1000; let startDelay = 1;
let gracePeriod = 5; let gracePeriod = 360;
let interval = null; let interval = null;
async function getCurrentTalkByRoomName(roomName, offset) { async function getCurrentTalkByRoomName(roomName, offset) {
@ -22,7 +22,7 @@
now = Date.parse(time) + offset; now = Date.parse(time) + offset;
} }
if (!data) { if (!offset || !data) {
const response = await fetch(scheduleUrl); const response = await fetch(scheduleUrl);
data = await response.json(); data = await response.json();
} }
@ -104,7 +104,7 @@
} }
if (room) { if (room) {
let offset = gracePeriod * 60 * 1000; let offset = gracePeriod * 1000;
let talk = await getCurrentTalkByRoomName(room); let talk = await getCurrentTalkByRoomName(room);
if (!talk) { if (!talk) {
talk = await getCurrentTalkByRoomName(room, -offset); talk = await getCurrentTalkByRoomName(room, -offset);
@ -195,7 +195,7 @@
fadeInText(), fadeInText(),
]); ]);
} }
await new Promise(r => setTimeout(r, holdDuration)); await new Promise(r => setTimeout(r, holdDuration * 1000));
await Promise.all([ await Promise.all([
fadeOut(), fadeOut(),
fadeOutText(), fadeOutText(),
@ -289,7 +289,7 @@
async function cycle() { async function cycle() {
if (await init()) { if (await init()) {
await new Promise(r => setTimeout(r, startDelay)); await new Promise(r => setTimeout(r, startDelay * 1000));
await animate(); await animate();
} }
if (interval) { if (interval) {