w3c / media-source

Media Source Extensions
https://w3c.github.io/media-source/
Other
268 stars 57 forks source link

HTML does not define any TimeRange interface #195

Open nox opened 7 years ago

nox commented 7 years ago

The specification mentions a TimeRange interface numerous times, pointing to this W3C HTML interface (WHATWG), which is named TimeRanges, plural.

chrisn commented 1 month ago

It looks like the spec has been updated to use TimeRanges throughout, but the new language is confusing because in some cases the intent is to refer to a singular time range - e.g., in 3.15.3:

If new playback position is not in any TimeRanges of HTMLMediaElement's buffered

joeyparrish commented 1 month ago

I don't agree. It refers to a single playback position, but multiple ranges. buffered represents multiple disjoint time ranges, and the playback position could be within any of them.

chrisn commented 1 month ago

That's right, but "any TimeRanges" is what's confusing, as "any time range" (i.e., of the TimeRanges in buffered) would be more grammatical.

joeyparrish commented 1 month ago

Okay, I agree on grammar, then.

jyavenard commented 1 month ago

because in some cases the intent is to refer to a singular time range

I don't think that's the intent. The intent is to state that currentTime is in none of the time intervals found in the buffered attribute.