update position state on audible state change

This commit is contained in:
Slowlife01
2025-03-13 09:21:45 +07:00
parent fff8b3f532
commit 4c74517e9e
2 changed files with 15 additions and 1 deletions

View File

@@ -99,7 +99,8 @@ class ZenMediaController {
* @param {Object} browser - The browser associated with the media controller.
*/
activateMediaControls(mediaController, browser) {
if (this._currentBrowser) this.updateMuteState();
this.updateMuteState();
if (this._currentBrowser?.browserId === browser.browserId) return;
else {
this.deinitMediaController(this._currentMediaController);
@@ -271,6 +272,7 @@ class ZenMediaController {
}
updateMuteState() {
if (!this._currentBrowser) return;
if (this._currentBrowser._audioMuted) {
this.mediaControlBar.setAttribute('muted', '');
} else {