Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2065363002: [Android, Video, Autoplay] Only autoplay muted videos, ignore audio tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed setTimeout to 0 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/media/autoplay-muted.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index ed596d00d9df66b3052914fec0e6c9c47b0352e2..a73f6a0f70b68bac03cdee412eb07269ac935c11 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3710,7 +3710,8 @@ bool HTMLMediaElement::isGestureNeededForPlayback() const
// - the flag is enabled;
// - Data Saver is not enabled;
// - Autoplay is enabled in settings;
- if (muted()
+ if (isHTMLVideoElement()
+ && muted()
&& RuntimeEnabledFeatures::autoplayMutedVideosEnabled()
&& !(document().settings() && document().settings()->dataSaverEnabled())
&& isAutoplayAllowedPerSettings()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/media/autoplay-muted.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698