Created
July 6, 2022 11:18
-
-
Save uazo/3e46ffe8626b09864102fe4091c52559 to your computer and use it in GitHub Desktop.
01-Fix-2096-Revert the removal of an option to block (fixup).patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: Your Name <you@example.com> | |
Date: Fri, 1 Jul 2022 12:57:24 +0000 | |
Subject: Revert the removal of an option to block (fixup) | |
--- | |
third_party/blink/renderer/core/html/media/autoplay_policy.cc | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/third_party/blink/renderer/core/html/media/autoplay_policy.cc | |
--- a/third_party/blink/renderer/core/html/media/autoplay_policy.cc | |
+++ b/third_party/blink/renderer/core/html/media/autoplay_policy.cc | |
@@ -311,12 +311,14 @@ void AutoplayPolicy::TryUnlockingUserGesture() { | |
} | |
bool AutoplayPolicy::IsGestureNeededForPlayback() const { | |
+ if (!IsAutoplayAllowedPerSettings()) | |
+ return true; | |
if (!IsLockedPendingUserGesture()) | |
return false; | |
// We want to allow muted video to autoplay if the element is allowed to | |
// autoplay muted. | |
- return !(IsEligibleForAutoplayMuted() && IsAutoplayAllowedPerSettings()); | |
+ return !IsEligibleForAutoplayMuted(); | |
} | |
String AutoplayPolicy::GetPlayErrorMessage() const { | |
-- | |
2.25.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment