Chromium Code Reviews| 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 7beecb9dd4be9a28665ac847fe9e6f45f67b085f..aac7685134bb6ec51f87fe7767f7907c6b686455 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
| @@ -94,7 +94,7 @@ |
| #include "wtf/text/CString.h" |
| #include <limits> |
| -#define MEDIA_LOG_LEVEL 3 |
| +#define MEDIA_LOG_LEVEL 0 |
|
mlamouri (slow - plz ping)
2016/06/07 12:50:41
Did you mean to change this?
whywhat
2016/06/07 14:20:08
Reverted.
|
| #ifndef LOG_MEDIA_EVENTS |
| // Default to not logging events because so many are generated they can overwhelm the rest of |
| @@ -2264,6 +2264,9 @@ void HTMLMediaElement::setMuted(bool muted) |
| Platform::current()->recordAction(UserMetricsAction("Media_Playback_Mute_Off")); |
| scheduleEvent(EventTypeNames::volumechange); |
| + |
| + if (!UserGestureIndicator::processingUserGesture()) |
| + pause(); |
|
mlamouri (slow - plz ping)
2016/06/07 12:50:41
We should only have this behaviour for videos that
whywhat
2016/06/07 14:20:08
Removed.
|
| } |
| void HTMLMediaElement::updateVolume() |
| @@ -3661,8 +3664,16 @@ void HTMLMediaElement::unlockUserGesture() |
| bool HTMLMediaElement::isGestureNeededForPlayback() const |
| { |
| - return m_lockedPendingUserGesture |
| - && !m_autoplayHelper->isGestureRequirementOverridden(); |
| + if (!m_lockedPendingUserGesture) |
| + return false; |
| + |
| + if (RuntimeEnabledFeatures::videosAsImagesEnabled() && muted()) |
| + return false; |
|
mlamouri (slow - plz ping)
2016/06/07 12:50:41
I would leave this for another CL but you will nee
whywhat
2016/06/07 14:20:08
Ok.
|
| + |
| + if (m_autoplayHelper->isGestureRequirementOverridden()) |
| + return false; |
| + |
| + return true; |
| } |
| void HTMLMediaElement::setNetworkState(NetworkState state) |