Check if controller is active before activating

This commit is contained in:
Slowlife01
2025-03-15 16:11:35 +07:00
parent 8ea7b497ff
commit de14e8e935

View File

@@ -138,7 +138,7 @@ class ZenMediaController {
activateMediaControls(mediaController, browser) {
this.updateMuteState();
if (this._currentBrowser?.browserId === browser.browserId) return;
if (!mediaController.isActive || this._currentBrowser?.browserId === browser.browserId) return;
else {
this.deinitMediaController(this._currentMediaController);
this._currentMediaController = mediaController;