fix: Fixed media controller mute not updating tab mute state, b=(closes #7798), c=media

This commit is contained in:
Slowlife01
2025-04-25 14:39:50 +07:00
parent 139e7a8b25
commit 7bb113d1f0

View File

@@ -586,12 +586,10 @@
}
onMediaMute() {
if (!this.mediaControlBar.hasAttribute('muted')) {
this._currentBrowser.mute();
this.mediaControlBar.setAttribute('muted', '');
} else {
this._currentBrowser.unmute();
this.mediaControlBar.removeAttribute('muted');
const tab = window.gBrowser.getTabForBrowser(this._currentBrowser);
if (tab) {
tab.toggleMuteAudio();
this.updateMuteState();
}
}
@@ -639,7 +637,7 @@
updateMuteState() {
if (!this._currentBrowser) return;
this.mediaControlBar.toggleAttribute('muted', this._currentBrowser._audioMuted);
this.mediaControlBar.toggleAttribute('muted', this._currentBrowser.audioMuted);
}
updatePipButton() {