Easy Tutorial
❮ Prop Link Charset Met Video Addtexttrack ❯

Track Label Attribute

Track Object

Example

Get the text track label:

var x = document.getElementById("myTrack").label;

x output result is:

English

Definition and Usage

The label attribute is used to set or return the label attribute value of a track.

The label attribute describes the label/title of the text track.


Browser Support

Attribute Chrome IE Firefox Safari Opera
label Yes 10.0 Not supported Not supported Yes

Syntax

Return the label attribute:

trackObject.label

Set the label attribute:

trackObject.label = label

Attribute Values

Value Description
label Specifies the label/title of the text track

Technical Details

| Return Value: | String, representing the title/label of the text track | | --- | --- |


Track Object

❮ Prop Link Charset Met Video Addtexttrack ❯