0

Ignore seek operations to the current time during pause state. This change

is required to remove the noseekrequired logic in HTMLMediaElement.cpp

BUG=266631

Review URL: https://codereview.chromium.org/685993002

Cr-Commit-Position: refs/heads/master@{#304019}
This commit is contained in:
srirama.m
2014-11-13 04:40:12 -08:00
committed by Commit bot
parent f40c65ae5e
commit f881f652f0

@ -337,8 +337,20 @@ void WebMediaPlayerImpl::seek(double seconds) {
media_log_->AddEvent(media_log_->CreateSeekEvent(seconds));
// Update our paused time.
if (paused_)
paused_time_ = seek_time;
// In paused state ignore the seek operations to current time and generate
// buffer state change event to eventually fire seeking and seeked events
if (paused_) {
if (paused_time_ != seek_time) {
paused_time_ = seek_time;
} else {
main_task_runner_->PostTask(
FROM_HERE,
base::Bind(&WebMediaPlayerImpl::OnPipelineBufferingStateChanged,
AsWeakPtr(),
BUFFERING_HAVE_ENOUGH));
return;
}
}
seeking_ = true;