Always use MediaSource seekable range regardless of readyState

If the liveSeekable attribute is set, then the seekable attribute must return the liveseekable range.
https://w3c.github.io/media-source/index.html#htmlmediaelement-extensions
This commit is contained in:
trav90
2018-03-04 08:26:23 -06:00
committed by Roy Tam
parent d0e9792d7e
commit e4eb14321c
+2 -1
View File
@@ -1598,7 +1598,8 @@ already_AddRefed<TimeRanges>
HTMLMediaElement::Seekable() const
{
nsRefPtr<TimeRanges> ranges = new TimeRanges();
if (mDecoder && mReadyState > nsIDOMHTMLMediaElement::HAVE_NOTHING) {
if (mMediaSource ||
(mDecoder && mReadyState > nsIDOMHTMLMediaElement::HAVE_NOTHING)) {
mDecoder->GetSeekable().ToTimeRanges(ranges);
}
return ranges.forget();