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

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

Issue 2051253002: Start autoplay muted videos with autoplay attribute when they are visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reduce 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
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.h b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
index 653bd31414424e201ea67841db7031fe26075257..0330387ebf8a7c659bd10006436d0a4456530a6b 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.h
@@ -47,6 +47,7 @@ class AudioSourceProviderClient;
class AudioTrackList;
class ContentType;
class CueTimeline;
+class ElementVisibilityObserver;
class EnumerationHistogram;
class Event;
class ExceptionState;
@@ -491,6 +492,8 @@ private:
void recordAutoplaySourceMetric(int source);
+ void onVisibilityChangedForAutoplay(bool isVisible);
+
UnthrottledTimer<HTMLMediaElement> m_loadTimer;
UnthrottledTimer<HTMLMediaElement> m_progressEventTimer;
UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer;
@@ -668,6 +671,9 @@ private:
WebRemotePlaybackClient* m_remotePlaybackClient;
+ // class AutoplayVisibilityObserver;
+ Member<ElementVisibilityObserver> m_autoplayVisibilityObserver;
+
static URLRegistry* s_mediaStreamRegistry;
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698