| Index: media/blink/webmediaplayer_impl.cc
|
| diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
| index 5be9452d38f572d1cd0acb5b9da0f1a7499771ce..e10420a9cc3da976cb6a393836d9f02c55c6d50f 100644
|
| --- a/media/blink/webmediaplayer_impl.cc
|
| +++ b/media/blink/webmediaplayer_impl.cc
|
| @@ -488,6 +488,10 @@ bool WebMediaPlayerImpl::seeking() const {
|
| return seeking_;
|
| }
|
|
|
| +double WebMediaPlayerImpl::earliestTime() const {
|
| + return pipeline_.GetMediaStartTime().InSecondsF();
|
| +}
|
| +
|
| double WebMediaPlayerImpl::duration() const {
|
| DCHECK(main_task_runner_->BelongsToCurrentThread());
|
|
|
| @@ -556,6 +560,7 @@ blink::WebTimeRanges WebMediaPlayerImpl::seekable() const {
|
| if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata)
|
| return blink::WebTimeRanges();
|
|
|
| + const double seekable_start = pipeline_.GetMediaStartTime().InSecondsF();
|
| const double seekable_end = duration();
|
|
|
| // Allow a special exception for seeks to zero for streaming sources with a
|
| @@ -567,7 +572,8 @@ blink::WebTimeRanges WebMediaPlayerImpl::seekable() const {
|
| // infinite duration so long as DataSource::IsStreaming() is false. While not
|
| // expected, disabling this breaks semi-live players, http://crbug.com/427412.
|
| const blink::WebTimeRange seekable_range(
|
| - 0.0, allow_seek_to_zero ? 0.0 : seekable_end);
|
| + allow_seek_to_zero ? 0.0 : seekable_start,
|
| + allow_seek_to_zero ? 0.0 : seekable_end);
|
| return blink::WebTimeRanges(&seekable_range, 1);
|
| }
|
|
|
|
|