The src attribute on a <track> tag specifies the URL or path of an text track file.
The browser uses the URL to locate and load the text track file.
A src attribute on a <track> element.
The attribute references a file with a text track for Spanish subtitles.
<video controls="controls" width="320" height="176">
<source src="/media/godfather.mp4" type="video/mp4" />
<source src="/media/godfather.ogg" type="video/ogg" />
<track src="/media/godfather.srt" kind="subtitles" srclang="es" label="Spanish" />
</video>
The src attribute specifies the URL or path of the track file.
The browser uses the URL to locate and load the text track file.
Track files must be in a Web Video Text Tracks (.vtt, WebVTT) file format.
The URL of the track file can be external (from another website) or internal (same website).
<track src="URL">
Value | Description |
---|---|
URL | URL or path of the track file. |
Here is when src support started for each browser:
Chrome
|
23.0 | Nov 2012 |
Firefox
|
31.0 | Jul 2014 |
IE/Edge
|
10.0 | Sep 2012 |
Opera
|
12.1 | Nov 2012 |
Safari
|
6.0 | Jul 2012 |