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

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

Issue 2689323002: Media: Delete Pause-To-Buffer. (Closed)
Patch Set: Rebase. Created 3 years, 9 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 00c36f940b08df6da5303e9a832f65c82a0b3134..a9feb811ce5ee684462a6a8ff3e5b418be3db0de 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -2314,13 +2314,6 @@ Nullable<ExceptionCode> HTMLMediaElement::play() {
void HTMLMediaElement::playInternal() {
BLINK_MEDIA_LOG << "playInternal(" << (void*)this << ")";
- // Always return the buffering strategy to normal when not paused,
- // regardless of the cause. (In contrast with aggressive buffering which is
- // only enabled by pause(), not pauseInternal().)
- if (webMediaPlayer())
- webMediaPlayer()->setBufferingStrategy(
- WebMediaPlayer::BufferingStrategy::Normal);
-
// 4.8.12.8. Playing the media resource
if (m_networkState == kNetworkEmpty)
invokeResourceSelectionAlgorithm();
@@ -2352,12 +2345,6 @@ void HTMLMediaElement::playInternal() {
void HTMLMediaElement::pause() {
BLINK_MEDIA_LOG << "pause(" << (void*)this << ")";
- // Only buffer aggressively on a user-initiated pause. Other types of pauses
- // (which go directly to pauseInternal()) should not cause this behavior.
- if (webMediaPlayer() && UserGestureIndicator::utilizeUserGesture())
- webMediaPlayer()->setBufferingStrategy(
- WebMediaPlayer::BufferingStrategy::Aggressive);
-
if (m_autoplayVisibilityObserver) {
m_autoplayVisibilityObserver->stop();
m_autoplayVisibilityObserver = nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698