diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index ba5f78c4cf27..3e08e2102155 100644
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4189,7 +4189,7 @@ HTMLMediaElement::WakeLockCreate()
NS_ENSURE_TRUE_VOID(pmService);
ErrorResult rv;
- mWakeLock = pmService->NewWakeLock(NS_LITERAL_STRING("cpu"),
+ mWakeLock = pmService->NewWakeLock(NS_LITERAL_STRING("audio-playing"),
OwnerDoc()->GetInnerWindow(),
rv);
}
diff --git a/dom/html/HTMLVideoElement.cpp b/dom/html/HTMLVideoElement.cpp
index 6aba8dfc00c5..25536932d7dd 100644
--- a/dom/html/HTMLVideoElement.cpp
+++ b/dom/html/HTMLVideoElement.cpp
@@ -334,7 +334,7 @@ HTMLVideoElement::UpdateScreenWakeLock()
NS_ENSURE_TRUE_VOID(pmService);
ErrorResult rv;
- mScreenWakeLock = pmService->NewWakeLock(NS_LITERAL_STRING("screen"),
+ mScreenWakeLock = pmService->NewWakeLock(NS_LITERAL_STRING("video-playing"),
OwnerDoc()->GetInnerWindow(),
rv);
}
diff --git a/widget/cocoa/nsAppShell.mm b/widget/cocoa/nsAppShell.mm
index da7bf5870851..72b2bc7eea15 100644
--- a/widget/cocoa/nsAppShell.mm
+++ b/widget/cocoa/nsAppShell.mm
@@ -60,7 +60,9 @@ private:
IOPMAssertionID mAssertionID = kIOPMNullAssertionID;
NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) override {
- if (!aTopic.EqualsASCII("screen")) {
+ if (!aTopic.EqualsASCII("screen") &&
+ !aTopic.EqualsASCII("audio-playing") &&
+ !aTopic.EqualsASCII("video-playing")) {
return NS_OK;
}
// Note the wake lock code ensures that we're not sent duplicate
diff --git a/widget/gtk/WakeLockListener.cpp b/widget/gtk/WakeLockListener.cpp
index bd97cc01f3e6..776046383d40 100644
--- a/widget/gtk/WakeLockListener.cpp
+++ b/widget/gtk/WakeLockListener.cpp
@@ -343,7 +343,9 @@ WakeLockListener::Callback(const nsAString& topic, const nsAString& state)
return NS_ERROR_FAILURE;
}
- if(!topic.Equals(NS_LITERAL_STRING("screen")))
+ if(!topic.Equals(NS_LITERAL_STRING("screen")) &&
+ !topic.Equals(NS_LITERAL_STRING("audio-playing")) &&
+ !topic.Equals(NS_LITERAL_STRING("video-playing")))
return NS_OK;
WakeLockTopic* topicLock = mTopics.Get(topic);
diff --git a/widget/windows/nsAppShell.cpp b/widget/windows/nsAppShell.cpp
index a4e14c517a05..01d0c72355d7 100644
--- a/widget/windows/nsAppShell.cpp
+++ b/widget/windows/nsAppShell.cpp
@@ -51,7 +51,9 @@ private:
~WinWakeLockListener() {}
NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) {
- if (!aTopic.EqualsASCII("screen")) {
+ if (!aTopic.EqualsASCII("screen") &&
+ !aTopic.EqualsASCII("audio-playing") &&
+ !aTopic.EqualsASCII("video-playing")) {
return NS_OK;
}
// Note the wake lock code ensures that we're not sent duplicate