Dart API Referencedart:htmlTrackElement

TrackElement Interface

The track element is used as a child of the media elements—<audio> and <video> —and does not represent anything on its own. It lets you specify timed text tracks (or time-based data).

The type of data that track adds to the media is set in the kind attribute, which can take values of subtitles, captions, descriptions, chapters or metadata. The element points to a source file containing timed text that the browser exposes when the user requests additional data.

Extends

Element

Constructors

Code new TrackElement() #

TrackElement();

Static Fields

Code final int ERROR #

static final int ERROR = 3;

Code final int LOADED #

static final int LOADED = 2;

Code final int LOADING #

static final int LOADING = 1;

Code final int NONE #

static final int NONE = 0;

Fields

Code bool defaultValue #

bool defaultValue;

Code String kind #

Kind of text track. The following keywords are allowed:
  • subtitles: A transcription or translation of the dialogue.
  • captions: A transcription or translation of the dialogue or other sound effects. Suitable for users who are deaf or when the sound is muted.
  • descriptions: Textual descriptions of the video content. Suitable for users who are blind.
  • chapters: Chapter titles, intended to be used when the user is navigating the media resource.
  • metadata: Tracks used by script. Not visible to the user.
String kind;

Code String label #

A user-readable title of the text track Used by the browser when listing available text tracks.
String label;

Code final int readyState #

final int readyState;

Code String src #

Address of the track. Must be a valid URL. This attribute must be defined.
String src;

Code String srclang #

Language of the track text data.
String srclang;

Code final TextTrack track #

final TextTrack track;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.