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
+2
View File
@@ -22,6 +22,8 @@ export function LoadFile(arg1:string):Promise<void>;
export function MuteToggle():Promise<void>;
export function Muted():Promise<boolean>;
export function Pause():Promise<void>;
export function Play():Promise<void>;
+4
View File
@@ -38,6 +38,10 @@ export function MuteToggle() {
return window['go']['player']['Player']['MuteToggle']();
}
export function Muted() {
return window['go']['player']['Player']['Muted']();
}
export function Pause() {
return window['go']['player']['Player']['Pause']();
}