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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

Issue 316003: Do not lower our ready state if the media resource is completely loaded. (Closed)
Patch Set: Created 11 years, 2 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: webkit/glue/webmediaplayer_impl.cc
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index e177937c7fccf5af87429561928b4fb9b0bdab0d..7bdd30e565c139e99a1a347e2e32ead5a55403a6 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -289,9 +289,13 @@ void WebMediaPlayerImpl::seek(float seconds) {
return;
}
+ // Drop our ready state if the media file isn't fully loaded.
+ if (!pipeline_->IsLoaded()) {
+ SetReadyState(WebKit::WebMediaPlayer::HaveMetadata);
+ }
+
// Try to preserve as much accuracy as possible.
float microseconds = seconds * base::Time::kMicrosecondsPerSecond;
- SetReadyState(WebKit::WebMediaPlayer::HaveMetadata);
pipeline_->Seek(
base::TimeDelta::FromMicroseconds(static_cast<int64>(microseconds)),
NewCallback(proxy_.get(),
« 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