Difference between revisions of "HTML/Elements/track"

From W3C Wiki
< HTML‎ | Elements
Jump to: navigation, search
(See also)
(The referenced IDL gives 'metadata' not 'metadatas'.)
 
Line 38: Line 38:
 
** <code>descriptions</code><br />Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable  
 
** <code>descriptions</code><br />Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable  
 
** <code>chapters</code><br />Chapter titles, intended to be used for navigating the media resource.
 
** <code>chapters</code><br />Chapter titles, intended to be used for navigating the media resource.
** <code>metadatas</code><br />Tracks intended for use from script.
+
** <code>metadata</code><br />Tracks intended for use from script.
  
  

Latest revision as of 21:27, 29 April 2013

<track>

The <track> element allows authors to specify explicit external timed tracks for media elements. It does not represent anything on its own.

HTML Attributes

  • kind = subtitles/ captions/ descriptions/ chapters/ metadata
    • subtitles
      Transcription or translation of the dialogue, suitable for when the sound is available but not understood
    • captions
      Transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information, suitable for when the soundtrack is unavailable
    • descriptions
      Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable
    • chapters
      Chapter titles, intended to be used for navigating the media resource.
    • metadata
      Tracks intended for use from script.


  • src = valid non-empty URL potentially surrounded by spaces
    Gives the address of the timed track data.
    This attribute must be present.


  • charset = character encoding name


  • srclang = valid BCP47 language tag.
    Gives the language of the timed track data.
    This attribute must be present if the element's kind attribute is in the subtitles state.


  • label = string
    Gives a user-readable title for the track.


See also global attributes.


Examples

This video has subtitles in several languages:

<video src="brave.webm">
 <track kind=subtitles src=brave.en.srt srclang=en label="English">
 <track kind=captions src=brave.en.srt srclang=en label="English for the Hard of Hearing">
 <track kind=subtitles src=brave.fr.srt srclang=fr label="Français">
 <track kind=subtitles src=brave.de.srt srclang=de label="Deutsch">
</video>


HTML reference

This element was introduced in HTML5 - 4.8.9 The track element.


See also