
The valid BCP 47 code for the language of the text track, e.g. Note: For chapters, default is required if you want the chapters menu to show. Otherwise, the viewer would need to select their language from a captions or subtitles menu. The boolean default attribute can be used to indicate that a track's mode should start as "showing". For example, in a menu for selecting a captions language. Short descriptive text for the track that will used in the user interface.

Similar to source elements, track elements should be added as children of the video element: Once you have your WebVTT files created, you can add them to your video element using the track tag. ).įor a more in depth style guide for captioning, see the Captioning Key, but keep in mind not all features are supported by WebVTT or (more likely) the Video.js WebVTT implementation.



Note: When creating captions, there are additional caption formatting techniques to make captions more meaningful, like brackets around sound effects (e.g. Microsoft has a builder that can help you get started on the file. This format defines a list of "cues" that have a start time, an end time, and text to display. Timed text requires a text file in WebVTT format. For that reason, we recommend only using remote text tracks. This is a convenient term for tracks that have an associated element rather than those that do not.Įither can be created programmatically, but only remote text tracks can be removed from a player. Video.js refers to so-called "remote" text tracks. Video.js offers a cross-browser implementation of text tracks. Text tracks are a feature of HTML5 for displaying time-triggered text to the end-user.
