Homepage: seamless theme music that keeps playing on /members/

Adds the eom.dev theme (Strudel) as a 16-bar Web Audio loop (Opus, AAC
fallback) with a Theme on/off button. Playback starts on the first
interaction unless the visitor turned it off. While it plays, links
between the homepage and membership pages are fetched and swapped in
place, so the music doesn't restart; sign-in, checkout, billing and
forms remain real navigations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 19:03:24 -05:00
co-authored by Claude Opus 5.5
parent 0b008c776a
commit 849a020cbc
8 changed files with 771 additions and 432 deletions
+16
View File
@@ -84,6 +84,22 @@ can use the permanent channel and playlist links. Requests use 10-second timeout
and a 2 MiB response limit. Titles are rendered as text, and watch/thumbnail URLs
are restricted to the PeerTube origin. No descriptions, HTML, or players are embedded.
### Theme music
The homepage plays the eom.dev theme (composed in Strudel) as a seamless 16-bar
loop: `htdocs/static/theme-player.mjs` with `htdocs/static/audio/eom-theme-loop.ogg`
(Opus) and an AAC `.m4a` fallback. Web Audio loops it without a gap. Browsers
block sound until the first click or key press, so it starts then unless the
visitor switched it off with the "Theme" button (remembered in localStorage).
While it plays, links between the homepage and `/members/` pages are fetched
and swapped into the same document, so the music does not restart on the
membership page. Forms, sign-in, checkout, billing and other sites stay normal
navigations (`HARD_NAV` in the module), and with the music off every link is a
normal navigation. The membership templates do not load the player; a visitor
who opens `/members/` directly gets no music. Sources and longer versions are
kept outside this repository (`eom-theme.strudel.js`).
### Local preview and content checks
With Node.js 24 or later, run `node scripts/preview.mjs` from this repository