diff --git a/static/app.js b/static/app.js index c5a016ec..9350924a 100644 --- a/static/app.js +++ b/static/app.js @@ -860,10 +860,10 @@ async function showScreen(id) { const hadPlayableSong = !!audio.src || !!window._juceAudioUrl || S.isPlaying; // Snapshot where we were so leaving the player — especially by accident // — is recoverable instead of dumping the user back at bar 1 next time. - // Must run BEFORE highway.stop()/audio unload, while getSongInfo() and + // Must run BEFORE window.highway.stop()/audio unload, while getSongInfo() and // the position (stopTime) are still live. if (hadPlayableSong) _snapshotResumeSession(stopTime); - highway.stop(); + window.highway.stop(); // Cancel any queued seeks, in-flight shim closures, AND active // count-in timers before stopping playback so none of these paths // can mutate the torn-down session (mirrors the same triple reset @@ -1049,7 +1049,7 @@ async function loadSettings() { const demucsEl = document.getElementById('demucs-server-url'); if (demucsEl) demucsEl.value = data.demucs_server_url || ''; const leftyEl = document.getElementById('setting-lefty'); - if (leftyEl) leftyEl.checked = highway.getLefty(); + if (leftyEl) leftyEl.checked = window.highway.getLefty(); const autoplayExitEl = document.getElementById('setting-autoplay-exit'); if (autoplayExitEl) autoplayExitEl.checked = _autoplayExitEnabled(); const showUpNextEl = document.getElementById('setting-show-upnext'); @@ -1435,7 +1435,7 @@ function setAvOffsetMs(ms, skipPersist) { // the audio-aligned chart time so plugins (note detection, etc.) // keep scoring against the real chart clock regardless of visual // calibration. - if (typeof highway !== 'undefined' && highway?.setAvOffset) highway.setAvOffset(_avOffsetMs); + if (window.highway?.setAvOffset) window.highway.setAvOffset(_avOffsetMs); // Sync any visible Settings slider const avSlider = document.getElementById('setting-av-offset'); if (avSlider) { @@ -1771,7 +1771,7 @@ window._juceAudioUrl = null; window.jucePlayer = jucePlayer; // ── Engine start/stop → re-route song audio (HTML5 ⇄ JUCE) ────────────────── -// window._juceMode is otherwise decided once, at song-load time (highway.js), +// window._juceMode is otherwise decided once, at song-load time (window.highway.js), // from isAudioRunning(). If the JUCE audio engine is started or stopped *after* // a song is already loaded (e.g. the user presses CHAIN / AMP), that decision // goes stale: the song stays on the HTML5