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:
+2
@@ -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>;
|
||||
|
||||
@@ -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']();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user