21 lines
1.0 KiB
Diff
21 lines
1.0 KiB
Diff
diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/third_party/blink/renderer/core/html/media/autoplay_policy.cc
|
|
index 7767e353a24c0bfbfa3ba63f75946aeec2452794..d457ef6f38efea3940133f264446c280ebd4ec2b 100644
|
|
--- a/third_party/blink/renderer/core/html/media/autoplay_policy.cc
|
|
+++ b/third_party/blink/renderer/core/html/media/autoplay_policy.cc
|
|
@@ -66,6 +66,7 @@ bool ComputeLockPendingUserGestureRequired(const Document& document) {
|
|
// static
|
|
AutoplayPolicy::Type AutoplayPolicy::GetAutoplayPolicyForDocument(
|
|
const Document& document) {
|
|
+ BRAVE_GET_AUTOPLAY_POLICY_FOR_DOCUMENT
|
|
if (!document.GetSettings())
|
|
return Type::kNoUserGestureRequired;
|
|
|
|
@@ -348,6 +349,7 @@ void AutoplayPolicy::TryUnlockingUserGesture() {
|
|
bool AutoplayPolicy::IsGestureNeededForPlayback() const {
|
|
if (!IsLockedPendingUserGesture())
|
|
return false;
|
|
+ BRAVE_AUTOPLAY_POLICY_IS_GESTURE_NEEDED_FOR_PLAYBACK
|
|
|
|
// We want to allow muted video to autoplay if the element is allowed to
|
|
// autoplay muted.
|