This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

length

Summary

The length attribute of a TextTrackList object returns the number of text tracks in the list represented by the TextTrackList.

Property of apis/audio-video/TextTrackListapis/audio-video/TextTrackList

Syntax

Note: This property is read-only.

var result = TextTrackList.length;

Return Value

Returns an object of type unsigned longunsigned long

Examples

//. . .
var myTextTrackList = document.getElementById("entrack").textTracks;
// report how many text tracks are in the list
alert(myTextTrackList.length);
//. . .

Notes

The maximum number of audio tracks a video can contain has not been defined in the World Wide Web Consortium (W3C) specification.

Related specifications

W3C HTML5 Specification
W3C Editor’s Draft

Attributions