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

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

Issue 228703002: avoid poster flicker during video looping or random seek operation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@media
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLVideoElement.cpp
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index 4399b983af84cec75bae3b7ce0fd9b34920bb424..b9df940c4b45a7e8547b6d2ea528d39773519756 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -167,7 +167,9 @@ void HTMLVideoElement::setDisplayMode(DisplayMode mode)
if (!poster.isEmpty()) {
// We have a poster path, but only show it until the user triggers display by playing or seeking and the
// media engine has something to display.
- if (mode == Video && !hasAvailableVideoFrame())
+ // Don't show the poster if there is a seek operation or
+ // the video has restarted because of loop attribute
+ if (mode == Video && oldMode == Poster && !hasAvailableVideoFrame())
mode = PosterWaitingForVideo;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698