summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmediaplayer_impl.cc
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 02:19:23 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-22 02:19:23 +0000
commitd6d3f4ed40cae4563ad5dab3e9406249387fa021 (patch)
tree3116380142279e546f89032d8fa2eb1de9663700 /webkit/glue/webmediaplayer_impl.cc
parent5a61f4b205d448ec01afa000470c2a44716fc62d (diff)
downloadchromium_src-d6d3f4ed40cae4563ad5dab3e9406249387fa021.zip
chromium_src-d6d3f4ed40cae4563ad5dab3e9406249387fa021.tar.gz
chromium_src-d6d3f4ed40cae4563ad5dab3e9406249387fa021.tar.bz2
Do not lower our ready state if the media resource is completely loaded.
If the media resource is a file:// we can always report that we have enough data to play the file. We end up passing a bunch of layout tests. BUG=13907 TEST=more layout tests pass Review URL: http://codereview.chromium.org/316003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmediaplayer_impl.cc')
-rw-r--r--webkit/glue/webmediaplayer_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index e177937..7bdd30e5 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(),