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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 684473002: Revert unintended prevention of seeks on infinite duration media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698