| 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 e9f9ba3a2b7fbdbf2ffd4e583e8cf446beea7d72..4de7e7601fe5a9b65415c2be6c4d66822413644f 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -2292,10 +2292,6 @@ void HTMLMediaElement::setMuted(bool muted) {
|
| m_muted = muted;
|
| m_autoplayHelper->mutedChanged();
|
|
|
| - updateVolume();
|
| -
|
| - scheduleEvent(EventTypeNames::volumechange);
|
| -
|
| // If an element autoplayed while muted, it needs to be unlocked to unmute,
|
| // otherwise, it will be paused.
|
| if (wasAutoplayingMuted) {
|
| @@ -2309,6 +2305,10 @@ void HTMLMediaElement::setMuted(bool muted) {
|
| }
|
| }
|
|
|
| + updateVolume();
|
| +
|
| + scheduleEvent(EventTypeNames::volumechange);
|
| +
|
| // If an element was a candidate for autoplay muted but not visible, it will
|
| // have a visibility observer ready to start its playback.
|
| if (wasPendingAutoplayMuted) {
|
| @@ -3018,6 +3018,14 @@ void HTMLMediaElement::cancelledRemotePlaybackRequest() {
|
| remotePlaybackClient()->promptCancelled();
|
| }
|
|
|
| +bool HTMLMediaElement::isAutoplayingMuted() {
|
| + if (!isHTMLVideoElement() ||
|
| + !RuntimeEnabledFeatures::autoplayMutedVideosEnabled())
|
| + return false;
|
| +
|
| + return muted() && isLockedPendingUserGesture();
|
| +}
|
| +
|
| void HTMLMediaElement::requestReload(const WebURL& newUrl) {
|
| DCHECK(webMediaPlayer());
|
| DCHECK(!m_srcObject);
|
|
|