display credits earlier

This commit is contained in:
Silas 2022-03-15 01:18:40 -04:00
parent b8d15577f3
commit e7cce120ee
Signed by: silentsilas
GPG Key ID: 4199EFB7DAA34349
1 changed files with 4 additions and 3 deletions

View File

@ -104,9 +104,6 @@ async function init() {
"/static/who_am_i_with_music.mp3", "/static/who_am_i_with_music.mp3",
1 1
); );
audio.onEnded = () => {
document.getElementById("credits").style.display = "block";
};
CORE.srt = await loadSRT(); CORE.srt = await loadSRT();
DISTORTION.audioAnalyser = new AudioAnalyser(audio, 512); DISTORTION.audioAnalyser = new AudioAnalyser(audio, 512);
@ -236,6 +233,10 @@ function updateSubtitles(delta: number) {
}); });
if (!found) CORE.subtitleDiv.innerHTML = ""; if (!found) CORE.subtitleDiv.innerHTML = "";
if (CORE.elapsedTime > 70) {
document.getElementById("credits").style.display = "block";
}
} }
function onWindowResize() { function onWindowResize() {