fix(venue-crowd): fall back to the loop when the intro fails to load

Codex preflight: a failed/timed-out intro left the song with no crowd
loop at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
byrongamatos
2026-07-12 21:25:26 +02:00
co-authored by Claude Fable 5
parent 99812b8ed3
commit 4abdfb5f5c
+7 -1
View File
@@ -381,7 +381,13 @@
};
loadAndPlay(video, _manifest.intro.video, false, (ok) => {
if (_introGen !== myGen) return;
if (!ok || !_venueActive) { _introActive = false; return; }
if (!ok || !_venueActive) {
// Failed intro must not leave the song loop-less: fall back
// to the normal loop exactly like the no-intro path.
_introActive = false;
if (_venueActive) showLoop(machine.current, FADE_MS);
return;
}
fadeMixTo(layer === 1 ? 1 : 0, 300);
video.addEventListener('ended', land);
setTimeout(land, 15000); // decode-stall safety