fix(player): show mute in the volume indicator

Muting does not change the volume level, and VolumeChanged carried
nothing but that level — so pressing M silenced playback and left the
indicator showing the volume it still had. The UI had nothing to react
to.

Mute rides on its own event rather than widening the volume payload,
since the two are genuinely independent: a muted player at 40% is a
different state from a player at 0%, and only one of them comes back
when you unmute. The icon crosses out and dims, and the popup gains an
explicit Mute/Unmute so the keyboard shortcut is not the only way in.

MuteToggle also now takes the speaker lock (it was mutating the effects
chain from outside it) and refuses politely rather than dereferencing a
nil streamer when nothing has been loaded yet.
This commit is contained in:
2026-08-11 01:14:47 -04:00
parent c48123f7a3
commit 0ca37a31a6
10 changed files with 154 additions and 4 deletions
@@ -62,6 +62,10 @@ export class PlayerController implements ReactiveController {
return this.state.volume;
}
get muted(): boolean {
return this.state.muted;
}
// ===================================================================
// ACTIONS
// Delegate to store (which delegates to backend)
@@ -82,4 +86,8 @@ export class PlayerController implements ReactiveController {
setVolume(level: number): void {
playerStore.setVolume(level);
}
toggleMute(): void {
playerStore.toggleMute();
}
}