| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index 83501f963528b688a2843f831a48733b5a6ecb3b..88e39384ea252ce0413015723eec8c1f678e60a2 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -276,6 +276,8 @@ enum AutoplayMetrics {
|
| AutoplayBailout = 2,
|
| // Autoplay disabled but user manually started media.
|
| AutoplayManualStart = 3,
|
| + // Autoplay was (re)enabled through a user-gesture triggered load()
|
| + AutoplayEnabledThroughLoad = 4,
|
| // This enum value must be last.
|
| NumberOfAutoplayMetrics,
|
| };
|
| @@ -740,8 +742,10 @@ void HTMLMediaElement::load()
|
| {
|
| WTF_LOG(Media, "HTMLMediaElement::load(%p)", this);
|
|
|
| - if (UserGestureIndicator::processingUserGesture())
|
| + if (UserGestureIndicator::processingUserGesture()) {
|
| + recordAutoplayMetric(AutoplayEnabledThroughLoad);
|
| m_userGestureRequiredForPlay = false;
|
| + }
|
|
|
| prepareForLoad();
|
| loadInternal();
|
|
|