summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/glue/webmediaplayer_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index e204be6..8b83468 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -780,14 +780,15 @@ void WebMediaPlayerImpl::OnPipelineInitialize(PipelineStatus status) {
static_cast<float>(pipeline_->GetMediaDuration().InSecondsF());
buffered_.swap(new_buffered);
+ if (pipeline_->IsLoaded()) {
+ SetNetworkState(WebKit::WebMediaPlayer::Loaded);
+ }
+
// Since we have initialized the pipeline, say we have everything otherwise
// we'll remain either loading/idle.
// TODO(hclam): change this to report the correct status.
SetReadyState(WebKit::WebMediaPlayer::HaveMetadata);
SetReadyState(WebKit::WebMediaPlayer::HaveEnoughData);
- if (pipeline_->IsLoaded()) {
- SetNetworkState(WebKit::WebMediaPlayer::Loaded);
- }
} else {
// TODO(hclam): should use |status| to determine the state
// properly and reports error using MediaError.