mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
update position state on audible state change
This commit is contained in:
@@ -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 {
|
||||
|
12
src/dom/html/HTMLMediaElement-cpp.patch
Normal file
12
src/dom/html/HTMLMediaElement-cpp.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
|
||||
index 0b8dee1ca22b1f0ddcf7e6a976f606990104b56e..a3a5a7cfcaa8a4719e56988bc917183fa3cc9d10 100644
|
||||
--- a/dom/html/HTMLMediaElement.cpp
|
||||
+++ b/dom/html/HTMLMediaElement.cpp
|
||||
@@ -455,6 +455,7 @@ class HTMLMediaElement::MediaControlKeyListener final
|
||||
// audible state. Therefore, in that case we would noitfy the audible state
|
||||
// when media starts playing.
|
||||
if (mState == MediaPlaybackState::ePlayed) {
|
||||
+ NotifyMediaPositionState();
|
||||
NotifyAudibleStateChanged(mIsOwnerAudible
|
||||
? MediaAudibleState::eAudible
|
||||
: MediaAudibleState::eInaudible);
|
Reference in New Issue
Block a user