| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index e1c3961c68b756d4b96bf7d23f996e93d3a0049f..e8f5bbd509a337e6c37fe56069c87f48fc0a8e86 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -261,6 +261,8 @@ enum AutoplayMetrics {
|
| AutoplayManualStart = 3,
|
| // Autoplay was (re)enabled through a user-gesture triggered load()
|
| AutoplayEnabledThroughLoad = 4,
|
| + // Autoplay disabled by sandbox flags.
|
| + AutoplayDisabledBySandbox = 5,
|
| // This enum value must be last.
|
| NumberOfAutoplayMetrics,
|
| };
|
| @@ -1536,9 +1538,12 @@ void HTMLMediaElement::setReadyState(ReadyState state)
|
| scheduleEvent(EventTypeNames::playing);
|
| }
|
|
|
| - if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(SandboxAutomaticFeatures)) {
|
| + if (m_autoplaying && m_paused && autoplay()) {
|
| autoplayMediaEncountered();
|
| - if (!m_userGestureRequiredForPlay) {
|
| +
|
| + if (document().isSandboxed(SandboxAutomaticFeatures)) {
|
| + recordAutoplayMetric(AutoplayDisabledBySandbox);
|
| + } else if (!m_userGestureRequiredForPlay) {
|
| m_paused = false;
|
| invalidateCachedTime();
|
| scheduleEvent(EventTypeNames::play);
|
|
|