diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/media/mediacontrol/MediaControlKeyManager.cpp | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/mediacontrol/MediaControlKeyManager.cpp')
-rw-r--r-- | dom/media/mediacontrol/MediaControlKeyManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dom/media/mediacontrol/MediaControlKeyManager.cpp b/dom/media/mediacontrol/MediaControlKeyManager.cpp index b40d3af91e..92e2679bdd 100644 --- a/dom/media/mediacontrol/MediaControlKeyManager.cpp +++ b/dom/media/mediacontrol/MediaControlKeyManager.cpp @@ -107,6 +107,7 @@ void MediaControlKeyManager::StopMonitoringControlKeys() { nullptr); obs->NotifyObservers(nullptr, "media-displayed-metadata-changed", nullptr); + obs->NotifyObservers(nullptr, "media-position-state-changed", nullptr); } } } @@ -197,6 +198,12 @@ void MediaControlKeyManager::SetPositionState( if (mEventSource && mEventSource->IsOpened()) { mEventSource->SetPositionState(aState); } + + if (StaticPrefs::media_mediacontrol_testingevents_enabled()) { + if (nsCOMPtr<nsIObserverService> obs = services::GetObserverService()) { + obs->NotifyObservers(nullptr, "media-position-state-changed", nullptr); + } + } } void MediaControlKeyManager::OnPreferenceChange() { |