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

Unified Diff: Source/core/html/AutoplayExperimentConfig.h

Issue 1329853004: Include viewport visibility checks for autoplay experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoplay_step1
Patch Set: Created 5 years, 3 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 | « Source/core/frame/FrameView.cpp ('k') | Source/core/html/AutoplayExperimentConfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/AutoplayExperimentConfig.h
diff --git a/Source/core/html/AutoplayExperimentConfig.h b/Source/core/html/AutoplayExperimentConfig.h
index e1dd6daa4ca8ae2d216aa7a2eb938f05be704f31..7392a6acf1b6cb2b547d5e3e65c65a448adf76f8 100644
--- a/Source/core/html/AutoplayExperimentConfig.h
+++ b/Source/core/html/AutoplayExperimentConfig.h
@@ -14,8 +14,8 @@ namespace blink {
class AutoplayExperimentConfig {
public:
// Experiment configuration bits. These maybe combined. For example,
- // ForVideo|IfMuted will override the user gesture requirement for
- // playing video that has no audio or is muted. ForVideo, by itself,
+ // ForVideo|IfViewport will override the user gesture requirement for
+ // playing video that is visible in the viewport. ForVideo, by itself,
// will entirely override the user gesture requirement for all video
// elements, but not for audio elements.
enum Mode {
@@ -25,14 +25,17 @@ class AutoplayExperimentConfig {
ForVideo = 1 << 0,
// Enable gestureless autoplay for audio elements.
ForAudio = 1 << 1,
+ // Restrict gestureless autoplay to media that is visible in
+ // the viewport.
+ IfViewport = 1 << 2,
philipj_slow 2015/09/04 08:47:56 Ah, here it is. Here's where a document.visibility
// Restrict gestureless autoplay to audio-less or muted media.
- IfMuted = 1 << 2,
+ IfMuted = 1 << 3,
// Restrict gestureless autoplay to sites which contain the
// viewport tag.
- IfMobile = 1 << 3,
+ IfMobile = 1 << 4,
// If gestureless autoplay is allowed, then mute the media before
// starting to play.
- PlayMuted = 1 << 4,
+ PlayMuted = 1 << 5,
};
static Mode fromString(const WTF::String& token);
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/html/AutoplayExperimentConfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698