w3c / media-source

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

Editorial: Align with Web IDL specification #342

Closed autokagami closed 6 months ago

autokagami commented 6 months ago

🤖 This is an automated pull request to align the spec with the latest Web IDL specification. 🤖

The followings are the Web IDL validation messages, which may help understanding this PR:

Currently this autofix might introduce awkward code formatting, and feel free to manually fix it whenever it happens.

Please file an issue at https://github.com/saschanaz/webidl-updater/issues/new if you think this is invalid or should be enhanced.


Preview | Diff

tidoust commented 6 months ago

That seems good to me. Making both dictionary members required could perhaps work just as well? (the spec always sets them when it constructs a BufferedChangeEvent).

TimeRanges is not a constructible class, so use of the constructor is going to remain limited to essentially cloning an existing event... or playing with media playback somehow to get the ranges one needs?

In any case, the spec should also define the algorithm for the constructor, e.g., to explain that a TimeRanges object with length 0 must be created when the member is not set in the dictionary.