feat(audio): Music shuffles to a new random track when each finishes (gapless) #35

Merged
benstull merged 1 commits from feat/music-shuffle-on-end into main 2026-07-03 13:00:47 +00:00

1 Commits

Author SHA1 Message Date
BenStullsBets e666465d62 feat(audio): Music plays each track to its end, then a random next (gapless)
Replace the fixed 5-min rotation with end-driven shuffle: each track plays through,
and a short crossfade a few seconds before it ends rolls a random OTHER track
(pickNextIndex, no immediate repeat) — so Music is always playing while selected.
An 'ended' handler is the safety net (short track / missed timeupdate) and a
watchdog resumes an unexpectedly-paused active track. Crossfade injectable via
window.__hefMusicXfadeMs. music-playlist.spec.ts reworked to the end-driven model.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 06:00:27 -07:00