| 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 989a95832f849c1e1e2651401e4fadf91f907abd..7f9d2b3c5b0d728a6bc7581ff84b7f16d81ff992 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -635,6 +635,13 @@ void HTMLMediaElement::ParseAttribute(
|
| if (!params.new_value.IsNull()) {
|
| ignore_preload_none_ = false;
|
| InvokeLoadAlgorithm();
|
| + if (pending_play_) {
|
| + if (!paused_ && !playing_) {
|
| + PlayInternal();
|
| + } else {
|
| + pending_play_ = false;
|
| + }
|
| + }
|
| }
|
| } else if (name == controlsAttr) {
|
| UseCounter::Count(GetDocument(),
|
| @@ -2300,6 +2307,9 @@ Nullable<ExceptionCode> HTMLMediaElement::Play() {
|
|
|
| Nullable<ExceptionCode> exception_code = autoplay_policy_->RequestPlay();
|
|
|
| + if (EffectivePreloadType() == WebMediaPlayer::kPreloadNone && !src_object_)
|
| + pending_play_ = true;
|
| +
|
| if (exception_code == kNotAllowedError) {
|
| // If we're already playing, then this play would do nothing anyway.
|
| // Call playInternal to handle scheduling the promise resolution.
|
| @@ -3350,6 +3360,9 @@ void HTMLMediaElement::UpdatePlayState() {
|
|
|
| StartPlaybackProgressTimer();
|
| playing_ = true;
|
| + if (pending_play_)
|
| + pending_play_ = false;
|
| +
|
| } else { // Should not be playing right now
|
| if (is_playing) {
|
| GetWebMediaPlayer()->Pause();
|
|
|