HTML and CSS Reference
In-Depth Information
Text Markup Language (TTML), 12 that may be used instead. The WebVTT format is
currently defined only in the WHATWG version of HTML(5), 13 but the W3C has a pro-
posed WebVTT working group charter published. 14
___________
12 See www.w3.org/TR/2010/REC-ttaf1-dfxp-20101118/
13 Remember WHATWG uses version-less development, so HTML and HTML5 are one and the
same.
14 See www.w3.org/2011/05/google-webvtt-charter.html
The label attribute gives a human-readable description of the contents of the text
track that a web browser could display to a user to change to a different subtitle lan-
guage, for instance. The Boolean default attribute sets which text track is enabled
initially. A particular video could contain subtitles in multiple languages so this attribute
could be used to set the default language to use. Speaking of languages, the last attribute,
srclang , is for precisely that: defining the language the timed text track is written in.
An example implementation might look like this:
<video width="320" height="240">
<source src="trailer.webm" type='video/webm; co-
decs="vp8, vorbis"' />
<source src="trailer.mp4" type='video/mp4; codec-
s="avc1.4D401E, mp4a.40.2"' />
<track kind="captions" label="English Captions"
srclang="en"
src="trailer_cc_en.vtt" default />
 
Search WWH ::




Custom Search