Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2289543005: Allow suspension prior to reaching kHaveFutureData. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5889a8f795c07f25f1ac9d8627c0aa344c51fb03..9c9e89b96d91e3cb386def79fc24e0d6c3e95da4 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -3175,6 +3175,12 @@ void HTMLMediaElement::updatePlayState()
mediaControls()->playbackStopped();
}
+ if (webMediaPlayer()) {
+ // Always notify of playback state changes; this information is used by
+ // the WebMediaPlayer to optimize resource consumption.
+ webMediaPlayer()->setPlaybackState(m_playing || !m_paused ? WebMediaPlayer::PlaybackState::Playing : WebMediaPlayer::PlaybackState::Paused);
sandersd (OOO until July 31) 2016/08/30 18:40:18 This way of sending the information somewhat impli
DaleCurtis 2016/08/30 21:56:04 Added set during startPlayerLoad() -- otherwise I
+ }
+
if (layoutObject())
layoutObject()->updateFromElement();
}

Powered by Google App Engine
This is Rietveld 408576698