global player pt. 3 persistence shenanigans

This commit is contained in:
2026-02-06 01:44:47 -08:00
parent b4d68299c3
commit 938b3a3334
2 changed files with 16 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
nowPlayingLabel,
prev,
removeTrack,
schedulePersistNow,
setUiOpen,
setVolume,
toggleShuffle,
@@ -151,6 +152,11 @@
$effect(() => {
media.setTrack(snap.currentTrack);
// Persist queue/settings/UI state (throttled) from within a component-scoped effect
// to avoid orphaned module-level `$effect`.
schedulePersistNow();
if (!audioEl) return;
audioEl.volume = snap.volume;