Add radio now-playing metadata polling and readonly props

This commit is contained in:
Jage9
2026-02-25 00:52:28 -05:00
parent 1745915ec3
commit 9eaa330c3e
10 changed files with 220 additions and 3 deletions

View File

@@ -65,6 +65,8 @@
"mediaVolume": 50,
"mediaEffect": "off",
"mediaEffectValue": 50,
"stationName": "",
"nowPlaying": "",
"facing": 0,
"emitRange": 10
}
@@ -77,6 +79,9 @@
- `mediaChannel`: one of `stereo | mono | left | right`, default `stereo`.
- `mediaEffect`: one of `reverb | echo | flanger | high_pass | low_pass | off`, default `off`.
- `mediaEffectValue`: number, range `0-100`, precision `0.1`.
- UI visibility: `mediaEffectValue` is shown only when `mediaEffect != off` (`visibleWhen: {"mediaEffect": "!off"}`).
- `stationName`: server-managed station label derived from ICY metadata when available.
- `nowPlaying`: server-managed stream title derived from ICY metadata when available.
- `facing`: number, range `0-360`, step `1` (used when `directional=true`).
- UI visibility: `facing` is shown only when `directional=true` (`visibleWhen` metadata).
- `emitRange`: integer, range `5-20`, default `10`.

View File

@@ -25,6 +25,8 @@ This is behavior-focused documentation for item types and their defaults.
- `mediaVolume=50`
- `mediaEffect="off"`
- `mediaEffectValue=50`
- `stationName=""` (server-managed, read-only)
- `nowPlaying=""` (server-managed, read-only)
- `facing=0`
- `emitRange=10`
- Global:
@@ -42,8 +44,10 @@ This is behavior-focused documentation for item types and their defaults.
- `mediaVolume`: integer `0..100`
- `mediaEffect`: `reverb | echo | flanger | high_pass | low_pass | off`
- `mediaEffectValue`: number `0..100` with `0.1` precision
- Visible only when `mediaEffect != off` (`visibleWhen: {"mediaEffect": "!off"}`)
- `facing`: number `0..360` with step `1`
- `emitRange`: integer `5..20`
- `stationName` / `nowPlaying`: server-fetched metadata fields; not editable by clients.
## `dice`

View File

@@ -50,6 +50,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
- `item_use_sound` contains absolute item world coordinates (`x`, `y`) and sound path.
- For carried items, source coordinates resolve to the carrier's current position.
- `teleport_complete` contains absolute player world coordinates (`x`, `y`) at teleport landing.
- Radio metadata (`params.stationName`, `params.nowPlaying`) is server-managed and delivered through normal `item_upsert` updates.
- `item_piano_note` contains:
- `itemId`, `senderId`, `keyId`, `midi`, `on`
- resolved `instrument`, `voiceMode`, `octave`, `attack`, `decay`, `release`, `brightness`, `emitRange`
@@ -81,6 +82,7 @@ This is a behavior guide for packet semantics beyond raw schemas.
- `itemTypes[].globalProperties`: non-editable global values (`useSound`, `emitSound`, `useCooldownMs`, `emitRange`, `directional`, `emitSoundSpeed`, `emitSoundTempo`)
- Client item UI requires this metadata from the server; there is no fallback item definition map.
- Client property help/type rendering is metadata-driven; it does not infer fallback types/tooltips from hardcoded key heuristics.
- `visibleWhen` supports equality checks and string negation via `!` prefix (example: `{"mediaEffect": "!off"}`).
## Validation Boundaries