Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 2a8bc6b446321e6740ccabdf0c2f7afa8509fcaa..fd3ad9414b2adb72efddd4f52360c1b04b79c1a0 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -3228,6 +3228,17 @@ PassRefPtrWillBeRawPtr<TimeRanges> HTMLMediaElement::seekable() const |
double maxTimeSeekable = webMediaPlayer()->maxTimeSeekable(); |
if (maxTimeSeekable) |
return TimeRanges::create(0, maxTimeSeekable); |
+ } |
philipj_slow
2014/09/10 12:51:18
Doesn't compile ;)
DaleCurtis
2014/09/10 17:45:18
Heh, whoops, must have hit CtrlZ once too many bef
|
+ |
+ // For non-streaming media, emulate a seekable range around zero so looping works. |
philipj_slow
2014/09/10 12:51:18
I don't think this is fixing the problem at the ap
acolwell GONE FROM CHROMIUM
2014/09/10 17:38:43
But we don't want to advertise that we can actuall
philipj_slow
2014/09/10 18:42:10
Oh, is a streaming cache used for non-seekable HTT
DaleCurtis
2014/09/10 18:56:49
Some are cached, some may not be depending on flag
|
+ |
+ if (duration() != std::numeric_limits<double>::infinity()) { |
+ RefPtrWillBeRawPtr<TimeRanges> ranges = TimeRanges::create(); |
+ double now = webMediaPlayer()->currentTime(); |
+ ranges->add(0, std::numeric_limits<double>::epsilon()); |
+ ranges->add(now, now + std::numeric_limits<double>::epsilon()); |
acolwell GONE FROM CHROMIUM
2014/09/10 17:38:43
Have you tested this with https://codereview.chrom
DaleCurtis
2014/09/10 17:45:18
I haven't, but that CL just removes the noSeekRequ
acolwell GONE FROM CHROMIUM
2014/09/10 18:33:19
You only need the [0,epsilon) range for loop to wo
acolwell GONE FROM CHROMIUM
2014/09/10 18:41:05
Oh right. I didn't happen to notice that the neare
DaleCurtis
2014/09/10 18:56:49
Ah I thought you were asking to remove all ranges,
|
+ return ranges; |
+ } |
} |
return TimeRanges::create(); |
} |