| Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| index a3466a06728f0d90d5f9c40b17fdf6c67cb4c2d1..5e6d31b0c86c7203827f4ac7a40af122e48ea30b 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
| @@ -508,21 +508,18 @@ void HTMLVideoElement::MediaRemotingStarted() {
|
| }
|
|
|
| void HTMLVideoElement::MediaRemotingStopped() {
|
| - // Early return because this was already called when media remoting was
|
| - // disabled.
|
| - if (media_remoting_status_ == MediaRemotingStatus::kDisabled)
|
| - return;
|
| - DCHECK(media_remoting_status_ == MediaRemotingStatus::kStarted);
|
| + DCHECK(media_remoting_status_ == MediaRemotingStatus::kDisabled ||
|
| + media_remoting_status_ == MediaRemotingStatus::kStarted);
|
| + if (media_remoting_status_ != MediaRemotingStatus::kDisabled)
|
| + media_remoting_status_ = MediaRemotingStatus::kNotStarted;
|
| DCHECK(remoting_interstitial_);
|
| - media_remoting_status_ = MediaRemotingStatus::kNotStarted;
|
| remoting_interstitial_->Hide();
|
| }
|
|
|
| void HTMLVideoElement::DisableMediaRemoting() {
|
| + media_remoting_status_ = MediaRemotingStatus::kDisabled;
|
| if (GetWebMediaPlayer())
|
| GetWebMediaPlayer()->RequestRemotePlaybackDisabled(true);
|
| - media_remoting_status_ = MediaRemotingStatus::kDisabled;
|
| - MediaRemotingStopped();
|
| }
|
|
|
| } // namespace blink
|
|
|