html5<track> tag


  Translation results:

track

英[træk] 美[træk]

n. Path, trail; trace, trace; track, track; policy, route

vt. Track; track; monitor, monitor

vi. Advance along the track; go along a road, travel; be in a queue

html5<track> tagsyntax

Function: The <track> tag specifies an external text track for media such as video elements.

is used to specify subtitle files or other files containing text that are visible when the media is played.

Parameters:

PropertiesValueDescription
defaultdefaultSpecifies that this track is the default if no track is selected.
kind

captions

chapters

descriptions

metadata

subtitles

indicates what text type the track belongs to.
labellabelThe label or title of the track.
srcurlThe URL of the track.
srclanglanguage_codeThe language of the track. This attribute is required if the kind attribute value is "subtitles".

html5<track> tagexample

<video width="320" height="240" controls="controls">   
    <source src="forrest_gump.mp4" type="video/mp4" />   
    <source src="forrest_gump.ogg" type="video/ogg" />   
    <track kind="subtitles" src="subs_chi.srt" srclang="zh" label="Chinese">   
    <track kind="subtitles" src="subs_eng.srt" srclang="en" label="English"> 
</video>


Popular Recommendations

Home

Videos

Q&A