Back to Directory

Menu Music

Plays Music based on the Page the Person is on, can be configured in extension admin settings.

Description

Plays Music based on the Page the Person is on, can be configured in extension admin settings.

CalagopusMenuMusic A Calagopus Panel extension (dev.xcrafttm.menumusic) that plays background music which changes with the page the visitor is on. Admins configure it under Admin → Extensions → Menu Music → Configure. Features • A track per page. Login, Register, Password Reset & Email Verification, Server List, Account Settings, Server Pages (console, files, settings, allocations and every other server sub-page), and the Admin Area. Each page shows the URLs it covers, e.g. /auth/login/. • Custom pages by URL. Add your own pages with a name and a URL pattern where is a wildcard, e.g. /server//files for every server's file manager. A matching custom page wins over a built-in one, and the most specific pattern wins when several match. • A Default track. It plays on every page that has no track of its own. • Three playback modes for every track. Always play, Play when idle (starts after the user has been inactive for a set time and fades out on the next input), and Silent. • Direct links or panel assets. The track URL field autocompletes audio files from the panel's Admin → Assets tab, the same way the Application icon field does. You can also paste any direct https://… audio link, or use Upload to send a file straight into assets/menu-music/. • Preview and per-track volume on the configuration page. • Crossfades between pages. When you move to a page with a different track, the old track fades out while the new one fades in, over the configured crossfade duration. When two pages use the same track, it keeps playing across navigation instead of restarting. Looping uses the same crossfade: when a track reaches its end, it fades into its own beginning instead of jumping back. Tracks shorter than two crossfades use the browser's normal seamless loop. Music also fades in and out when it starts, stops, is muted, or reaches the idle delay. • User controls. Each user gets a Menu Music card on their Account page with an on/off switch and a volume slider. These settings sync to the account and are remembered on the login screen too. Logged-out visitors get a Menu music switch under the login form. Turning it off fades the music out and pauses it, and turning it back on resumes where it stopped. The choice is remembered on that device. • Autoplay handling. Browsers block audio until the visitor interacts with the page. Nothing is shown on screen for this: the music simply starts with whatever the current page should play on the first click, tap or key press anywhere. Configuration page | Left: Configured | Right: Using Default Track | | --- | --- | | The Default track is always first. Below it are the pages you gave their own track, each with playback mode, URL (asset autocomplete, upload, preview) and volume. They are shown in two columns when there is room. Use default moves a built-in page back to the right, and Remove deletes a custom page. | Every built-in page without its own track. These pages play the Default track. Add moves a page to the left so you can configure it. Below the list, Add Custom Page creates a page from a name and a URL pattern. | Save sits at the top of the page. Like the panel's own settings pages, Ctrl+S (Cmd+S on macOS) saves too, or whatever the user bound Save to under Account → Shortcuts. General options: • master on/off switch • idle delay in seconds, used by tracks set to Play when idle • crossfade duration • the volume new users start with Installing 1. Build the extension archive (needs Python 3.11+): 2. Install devxcrafttmmenumusic.c7s.zip on a panel running the :heavy image. You can upload it in Admin → Extensions, or use panel-rs extensions add. See Installing Extensions. Requires Panel >=1.2.3. GitHub Actions .github/workflows/build.yml runs on every push, on pull requests, and manually from the Actions tab. It builds the .c7s.zip and uploads it to the run. Open the run and download devxcrafttmmenumusic.c7s.zip under Artifacts. The download is the installable archive itself, so you don't need to unzip anything. Pushing a tag like v1.0.0 also attaches the archive to a GitHub release. The tag must match version in Cargo.toml. Developing Install the archive into a development environment with panel-rs extensions add dist/devxcrafttmmenumusic.c7s.zip. That command creates the links and frontend/tsconfig.json the panel build needs. Then run the pre-export checks: cargo clippy, cargo test -p devxcrafttmmenumusic, pnpm biome:fix-unsafe and pnpm build:ci. Layout Uploading needs the assets.upload admin permission and asset autocomplete needs assets.read. Reading the settings needs extensions.read, and saving them needs extensions.manage.

View on GitHub

Free & open source — install it from the repository

Specifications

AuthorXCraftTM
Last UpdatedOctober 2, 2026
CompatibilityCalagopus >=1.2.3

Tags

background-musicextensionmusic-playerplugin