This example uses pure HTML to display a video player with three tracks of captions. The English track is tagged with the default
keyword and displays when the video runs. To change caption tracks, click the Close Caption button
. The Video element uses the controls
attribute to provide basic playback control. The autoplay and loop attributes automatically start the video when the page opens, and will continue playing until the page is closed.
<video controls autoplay loop> <source src="video.mp4" type="video/mp4"> <track id="enTrack" src="entrack.vtt" label="English" kind="subtitles" srclang="en" default> <track id="esTrack" src="sptrack.vtt" label="Spanish" kind="subtitles" srclang="es"> <track id="deTrack" src="detrack.vtt" label="German" kind="subtitles" srclang="de"> HTML5 video not supported </video>