fix(MediaController): remove sharing state when hiding

This commit is contained in:
Slowlife01
2025-04-13 16:29:59 +07:00
parent 98220c5e74
commit a56aa7e308

View File

@@ -221,7 +221,8 @@
} }
) )
.then(() => { .then(() => {
this.mediaControlBar.setAttribute('hidden', 'true'); this.mediaControlBar.setAttribute('hidden', 'true')
this.mediaControlBar.removeAttribute('media-sharing');
gZenUIManager.updateTabsToolbar(); gZenUIManager.updateTabsToolbar();
gZenUIManager.restoreScrollbarState(); gZenUIManager.restoreScrollbarState();
}); });
@@ -235,7 +236,6 @@
if (this._currentMediaController.isBeingUsedInPIPModeOrFullscreen) return this.hideMediaControls(); if (this._currentMediaController.isBeingUsedInPIPModeOrFullscreen) return this.hideMediaControls();
this.updatePipButton(); this.updatePipButton();
this.mediaControlBar.removeAttribute('media-sharing');
} }
const mediaInfoElements = [this.mediaTitle, this.mediaArtist]; const mediaInfoElements = [this.mediaTitle, this.mediaArtist];