This Week in HTML 5 – Episode 25
Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.
The big news for the week of February 23rd (yes, I'm that far behind) is a collection of changes about how video is processed. The changes revolve around the resource selection algorithm to handle cases where the src
attribute of a <video>
element is set dynamically from script.
Background reading on the resource selection algorithm: Re: play() sometimes doesn't do anything now that load() is async, r2849: "Change the way resources are loaded for media elements to make it actually work", r2873: "make all invokations of the resource selection algorithm asynchronous."
Other video-related changes this week:
- r2845 changes the definition of the
drawImage()
method of the<canvas>
element to allow playing a video on a canvas. - r2847 defines that
<video>
and<audio>
elements delay the document'sonload
event. - r2848 changes the wording of the ready states documentation to prevent duplicate
canplay
events. - r2852 changes the wording of the ready states documentation to prevent duplicate
playing
events. - r2853 fixes the order of events of autoplayed video.
- r2855 adds an
autobuffer
attribute to<audio>
and<video>
elements. "Theautobuffer
attribute provides a hint that the author expects that downloading the entire resource optimistically will be worth it, even in the absence of theautoplay
attribute. In the absence of either attribute, the user agent is likely to find that waiting until the user starts playback before downloading any further content leads to a more efficient use of the network resources."
Another big change this week is the combination of r2859, 2860, and r2861: you can now declare the character encoding of XHTML documents served with the application/xhtml+xml
MIME type by using the <meta charset>
attribute, but only if the value is "UTF-8". Also, the charset
attribute must appear in the first 512 bytes of the document. Previously, the only ways to control the character encoding of an application/xhtml+xml
document were setting the charset
parameter on the HTTP Content-Type
header, or to use an encoding
attribute in the XML prolog.
In practice, this will make no difference to encoding detection algorithms; other UTF-* encodings are detected earlier (with a Byte Order Mark), and any other encoding would require an XML prolog. This is mainly to address the desire of a few overly vocal authors to be able to serve the same markup in both text/html
and application/xhtml+xml
modes. Background reading: Bug 6613: Allow <meta charset="UTF-8"/> in XHTML.
Other interesting changes this week:
- r2866 makes it clear that using tables for layout is non-conforming.
- r2868 makes it clear that
<canvas>
elements must have accessible fallback content within them. - r2870 drops the
<eventsource>
element.
Tune in next week for another exciting episode of "This Week in HTML 5."
“you can now override the character encoding of XHTML documents served with the application/xhtml+xml MIME type by using the attribute”
This is incorrect. It doesn’t override anything. I think it would be good to avoid saying that it “overrides”.
Your next paragraph is correct.