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 ea6ba1f0d538dcbb96d046e39c9af674aca353da..fb016ab359c1636a0737d31a116413df07e40e82 100644 |
--- a/content/renderer/media/android/webmediaplayer_android.cc |
+++ b/content/renderer/media/android/webmediaplayer_android.cc |
@@ -510,13 +510,21 @@ WebTimeRanges WebMediaPlayerAndroid::buffered() const { |
return buffered_; |
} |
-double WebMediaPlayerAndroid::maxTimeSeekable() const { |
- // If we haven't even gotten to ReadyStateHaveMetadata yet then just |
- // return 0 so that the seekable range is empty. |
+WebTimeRanges WebMediaPlayerAndroid::seekable() const { |
+ // If we haven't even gotten to ReadyStateHaveMetadata yet then there |
+ // are no seekable ranges. |
if (ready_state_ < WebMediaPlayer::ReadyStateHaveMetadata) |
- return 0.0; |
+ return WebTimeRanges(); |
+ |
DaleCurtis
2014/09/26 20:45:24
WDYT about reordering slightly so that:
const dou
philipj_slow
2014/09/29 09:33:44
Done.
|
+ // If we have a duration then use [0, duration] as the seekable range. |
scherkus (not reviewing)
2014/09/26 18:53:27
silly math/interval notation question: seeking to
philipj_slow
2014/09/26 20:32:02
Right, these are inclusive intervals, not only for
|
+ if (double range_end = duration()) { |
+ WebTimeRanges ranges(static_cast<size_t>(1)); |
+ ranges[0].start = 0.0; |
+ ranges[0].end = range_end; |
+ return ranges; |
+ } |
- return duration(); |
+ return WebTimeRanges(); |
} |
bool WebMediaPlayerAndroid::didLoadingProgress() { |