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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 787373008: Pass seek event through pipeline during loading state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed OnPipelineSeeked as it is redundant Created 5 years, 11 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: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 9f0c53db268226243b0244ab537c6ec8d81fe47f..63adba7d9cbdfeeb23c4d93c092b315d7f64063d 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -310,6 +310,7 @@ void WebMediaPlayerImpl::seek(double seconds) {
ended_ = false;
+ ReadyState old_state = ready_state_;
if (ready_state_ > WebMediaPlayer::ReadyStateHaveMetadata)
SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata);
@@ -332,10 +333,7 @@ void WebMediaPlayerImpl::seek(double seconds) {
if (paused_) {
if (paused_time_ != seek_time) {
paused_time_ = seek_time;
- } else {
- main_task_runner_->PostTask(
- FROM_HERE, base::Bind(&WebMediaPlayerImpl::OnPipelineSeeked,
- AsWeakPtr(), false, PIPELINE_OK));
+ } else if (old_state == ReadyStateHaveEnoughData) {
main_task_runner_->PostTask(
FROM_HERE,
base::Bind(&WebMediaPlayerImpl::OnPipelineBufferingStateChanged,
« 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