From e7cce120eeb71ce0c56d59b765227b002ee26a63 Mon Sep 17 00:00:00 2001 From: Silas Date: Tue, 15 Mar 2022 01:18:40 -0400 Subject: [PATCH] display credits earlier --- src/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index e07e9a1..51d2453 100644 --- a/src/index.ts +++ b/src/index.ts @@ -104,9 +104,6 @@ async function init() { "/static/who_am_i_with_music.mp3", 1 ); - audio.onEnded = () => { - document.getElementById("credits").style.display = "block"; - }; CORE.srt = await loadSRT(); DISTORTION.audioAnalyser = new AudioAnalyser(audio, 512); @@ -236,6 +233,10 @@ function updateSubtitles(delta: number) { }); if (!found) CORE.subtitleDiv.innerHTML = ""; + + if (CORE.elapsedTime > 70) { + document.getElementById("credits").style.display = "block"; + } } function onWindowResize() {