summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webmediaplayer_impl.cc11
-rw-r--r--webkit/glue/webmediaplayer_impl.h1
2 files changed, 6 insertions, 6 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index e13d942..4a64b0f 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -233,6 +233,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl(
pipeline_(NULL),
pipeline_thread_("PipelineThread"),
paused_(true),
+ seeking_(false),
playback_rate_(0.0f),
client_(client),
proxy_(NULL),
@@ -368,11 +369,6 @@ 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;
base::TimeDelta seek_time =
@@ -383,6 +379,8 @@ void WebMediaPlayerImpl::seek(float seconds) {
paused_time_ = seek_time;
}
+ seeking_ = true;
+
// Kick off the asynchronous seek!
pipeline_->Seek(
seek_time,
@@ -476,7 +474,7 @@ bool WebMediaPlayerImpl::seeking() const {
if (ready_state_ == WebKit::WebMediaPlayer::HaveNothing)
return false;
- return ready_state_ == WebKit::WebMediaPlayer::HaveMetadata;
+ return seeking_;
}
float WebMediaPlayerImpl::duration() const {
@@ -705,6 +703,7 @@ void WebMediaPlayerImpl::OnPipelineSeek() {
}
SetReadyState(WebKit::WebMediaPlayer::HaveEnoughData);
+ seeking_ = false;
GetClient()->timeChanged();
}
}
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 8aa6661..bae0d9b 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -303,6 +303,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// clock can creep forward a little bit while the asynchronous
// SetPlaybackRate(0) is being executed.
bool paused_;
+ bool seeking_;
float playback_rate_;
base::TimeDelta paused_time_;