The reveal currently plays a fixed 12s "payoff" clip. Often you'll want to hear more once everyone's guessed — a longer snippet, or the whole song — and maybe with playback controls to keep it going. This is an enhancement to play more of the revealed track. Lots of choices to thrash out — research/spec only, not started.
How playback works today (grounding)
- Clips are pre-cut MP3s: 5/10/20s intros + a 12s payoff (~40% into the song,
clips.PAYOFF_LEN), served over HTTP.
- Playback casts via
ha.play_url() → music_assistant.play_media with media_id = the clip URL, on the configured Music Assistant _ma player. Direct media_player.play_media to a _cast entity fails silently (chime, no audio) — MA must stream it through its own pipeline. MA calls can take >10s → fire-and-forget.
- The full original track is reachable from Navidrome/Subsonic (
subsonic.stream_url_params(song_id) / transcoded stream), so full-song playback doesn't need new clip storage — stream the library file, or let MA play the library track by its id.
Options — a scope ladder (cheapest → biggest)
- Longer payoff clip. Make
PAYOFF_LEN configurable, or cut a second longer payoff (e.g. 30s) and play it on reveal. Smallest change; still finite; a bit more disk.
- Play the full song on reveal. Cast the full original track (stream from Navidrome via MA) instead of / after the payoff. Needs a stop/skip so the game can continue (songs run 3–4 min).
- Transport controls for the revealed song. Host gets play / pause / stop / skip / (seek / volume) for the revealed track on the cast speaker, then continues when ready — a mini-player using MA
media_player.* services.
- Full library jukebox. Browse/search and play any library song on the speakers from the host UI. Much bigger, and largely duplicates Music Assistant itself — flag before pursuing.
Choices to thrash out
- Trigger: auto-play on reveal, or an on-demand "🎵 play full song" button (host phone / board)?
- What: longer clip vs full track vs configurable per game?
- Where: the game's cast speaker, the board, or the host's phone?
- Controls: fire-and-forget vs stop/skip vs full transport (pause / seek / volume)?
- Game flow: a full song blocks the round — auto-stop on "next", or an explicit "stop & continue"? How it interacts with the existing 12s payoff gate.
- Who: host-only, or anyone in the game?
- Mechanism: pre-cut longer clip (file) vs stream the original from Navidrome via MA vs MA playing the library track by its Navidrome id.
Notes for whoever builds it
- Keep the
_ma-not-_cast rule and MA's >10s latency (fire-and-forget) in mind for any new playback path.
- Transport controls need a real
media_player entity to command (the _ma player or its _cast), not just a fire-and-forget play_media.
No work beyond research — this is a spec to discuss.
The reveal currently plays a fixed 12s "payoff" clip. Often you'll want to hear more once everyone's guessed — a longer snippet, or the whole song — and maybe with playback controls to keep it going. This is an enhancement to play more of the revealed track. Lots of choices to thrash out — research/spec only, not started.
How playback works today (grounding)
clips.PAYOFF_LEN), served over HTTP.ha.play_url()→music_assistant.play_mediawithmedia_id= the clip URL, on the configured Music Assistant_maplayer. Directmedia_player.play_mediato a_castentity fails silently (chime, no audio) — MA must stream it through its own pipeline. MA calls can take >10s → fire-and-forget.subsonic.stream_url_params(song_id)/ transcoded stream), so full-song playback doesn't need new clip storage — stream the library file, or let MA play the library track by its id.Options — a scope ladder (cheapest → biggest)
PAYOFF_LENconfigurable, or cut a second longer payoff (e.g. 30s) and play it on reveal. Smallest change; still finite; a bit more disk.media_player.*services.Choices to thrash out
Notes for whoever builds it
_ma-not-_castrule and MA's >10s latency (fire-and-forget) in mind for any new playback path.media_playerentity to command (the_maplayer or its_cast), not just a fire-and-forgetplay_media.No work beyond research — this is a spec to discuss.