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
13 Remember WHATWG uses version-less development, so HTML and HTML5 are one and the
14 See
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"
src="trailer_cc_en.vtt" default />
Search WWH ::

Custom Search