Can someone explain, in s开发者_运维百科imple terms, the syntax for the type attribute and codecs parameter for the <source> element in HTML5?
Yes! Mark Pilgrim can!
- http://diveintohtml5.ep.io/video.html#markup (scroll down a bit for the
typeattribute on<source>elements)
In short:
- the first part of
typeis the video container file’s format (e.g. WebM, MP4) - the second part (the
codecsbit) lists the audio and video codecs used to encode the audio and video within the video container file
(If the terms “codec” and “container file” aren’t clear, Pilgrim’s got you covered there too: video containers and video codecs.)
To work out what values you should use for video formats not covered by Pilgrim, see http://wiki.whatwg.org/wiki/Video_type_parameters.
加载中,请稍侯......
精彩评论