Chromium Code Reviews| Index: content/renderer/media/android/webmediaplayer_android.cc |
| diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc |
| index 3e271ad5ec0730481a38e7d553440465818a5035..2a691ecaf810621c773e78ca4b5b7a583b9c3d5f 100644 |
| --- a/content/renderer/media/android/webmediaplayer_android.cc |
| +++ b/content/renderer/media/android/webmediaplayer_android.cc |
| @@ -525,13 +525,13 @@ blink::WebTimeRanges WebMediaPlayerAndroid::buffered() const { |
| } |
| blink::WebTimeRanges WebMediaPlayerAndroid::seekable() const { |
| - // Media without duration are considered streaming and should not be seekable. |
| - const double seekable_end = duration(); |
| - if (!base::IsFinite(seekable_end)) |
| + if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata) |
| return blink::WebTimeRanges(); |
| - // If we have a finite duration then use [0, duration] as the seekable range. |
| - blink::WebTimeRange seekable_range(0.0, seekable_end); |
| + // TODO(dalecurtis): Technically this allows seeking on media which return an |
| + // infinite duration. While not expected, disabling this breaks semi-live |
| + // players, http://crbug.com/427412. |
| + const blink::WebTimeRange seekable_range(0.0, duration()); |
|
wolenetz
2014/10/27 20:14:25
Versus pre-621573002, we now allow for duration()
DaleCurtis
2014/10/27 20:20:41
Nice eye, it was intended in my original CL and I
wolenetz
2014/10/27 20:26:47
Acknowledged.
|
| return blink::WebTimeRanges(&seekable_range, 1); |
| } |