“...extending the languageto better
support Web applications [...] This puts
HTML in direct competition with other
technologies[...] , in particular Flash and
Silverlight.”
Ian Hickson, Editor of HTML5
http://lists.w3.org/Archives/Public/public-html/2009Jan/0215.html
video as nativeobject
● “plays nice” with rest of the page
●
keyboard accessibility built-in
Demonstration of basic video, keyboard access, hover/transitions
don't do browsersniffing
http://www.flickr.com/photos/timdorr/2096272747/
33.
feature-detection for audio/video
if(!!document.createElement('video').canPlayType;) { … }
if (!!document.createElement('audio').canPlayType;) { … }
34.
feature-detection for audio/videocodecs
var v = document.createElement('video');
if (!!(v.canPlayType)&&
((v.canPlayType('video/webm;codecs="vp8,vorbis"') == 'probably')
||
(v.canPlayType('video/webm;codecs="vp8, vorbis"') == 'maybe')))
{ … }