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

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

Issue 313173008: Allow load if play() is immediately called when preload == 'none' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 6 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
« no previous file with comments | « LayoutTests/media/video-preload-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 380683b173f4715adebd76644a288b3f03b27a4b..df582568d2ead08851e9aed237e4d184558e3cf0 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -889,10 +889,12 @@ void HTMLMediaElement::loadResource(const KURL& url, ContentType& contentType, c
if (attemptLoad && canLoadURL(url, contentType, keySystem)) {
ASSERT(!webMediaPlayer());
- if (!autoplay() && m_preload == MediaPlayer::None)
+ if (!m_havePreparedToPlay && !autoplay() && m_preload == MediaPlayer::None) {
+ WTF_LOG(Media, "HTMLMediaElement::loadResource : Delaying load because preload == 'none'");
m_delayingLoadForPreloadNone = true;
- else
+ } else {
startPlayerLoad();
+ }
} else {
mediaLoadingFailed(MediaPlayer::FormatError);
}
« no previous file with comments | « LayoutTests/media/video-preload-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698