The TextTrack.mode property is a string which indicates the text track's mode. You can read this value to determine the current mode, and you can change this value to switch modes.


var mode = TextTrack.mode;

TextTrack.mode = "disabled" | "hidden" | "showing";


A DOMString which indicates the track's current mode. The text track mode is one of the values listed below, under Text track mode constants.

Text track mode constants

The text track mode—sometimes identified using the IDL enum TextTrackMode—must be one of the following values:

The text track is currently disabled. While the track's presence is exposed in the DOM, the user agent is otherwise ignoring it. No cues are active, no events are being fired, and the user agent won't attempt to obtain the track's cues.
The text track is currently active but the cues aren't being displayed. If the user agent hasn't tried to obtain the track's cues yet, it will do so soon (thereby populating the track's TextTrack.cues property). The user agent is keeping a list of the active cues (in the track's activeCues property) and events are being fired at the corresponding times, even though the text isn't being displayed.
The text track is currently enabled and is visible. If the track's cues list hasn't been obtained yet, it will be soon. The activeCues list is being maintained and events are firing at the appropriate times; the track's text is also being drawn appropriately based on the styling and the track's kind.

When the mode is "showing", text tracks are performed differently depending on their kind. In general:

  • Tracks whose kind is "subtitles" or "captions" are rendered with the cues overlaid over the top of the video.
  • Tracks whose kind is "descriptions" are presented in a non-visual form (for example, the text might be spoken to describe the action in the video).
  • Tracks whose kind is "chapters" are used by the user agent or the Web site or Web app to construct and present an interface for navigating the named chapters, where each cue in the list represents a chapter in the media. The user can then navigate to the desired chapter, which begins at the cue's start position and ends at the cue's end position.




Specification Status Comment
WebVTT: The Web Video Text Tracks Format
The definition of 'mode' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
modeChrome Full support 18Edge Full support 12Firefox Full support 31
Full support 31
Notes Before Firefox 52, using JavaScript to change the mode of a text track that's part of a media element would send one change event to the element's textTracks TextTrackList for each change, even if mutliple changes are made in a single pass through the Firefox event loop. Starting in Firefox 52, these changes are reflected by a single event.
IE Full support 10Opera Full support 15Safari Full support 6WebView Android Full support 4.4Chrome Android Full support 18Firefox Android Full support 31Opera Android No support NoSafari iOS Full support 7.1Samsung Internet Android Full support Yes


Full support  
Full support
No support  
No support
See implementation notes.
See implementation notes.


See also

Document Tags and Contributors

Contributors to this page: mdnwebdocs-bot, fscholz, Sheppy
Last updated by: mdnwebdocs-bot,