Track readyState
Property
Example
Get the current ready state of the track resource:
var x = document.getElementById("myTrack").readyState;
x output value is:
2 // Text track has been loaded, no errors
Definition and Usage
The readyState property returns the current ready state of the track resource.
The ready state indicates whether the resource is ready to start playing.
Note: This property is read-only.
Browser Support
Internet Explorer, Opera, and Chrome support the readyState property.
Note: Firefox, Safari, or Internet Explorer 9 and earlier versions do not support the readyState property.
Syntax
Technical Details
| Return Value: | A number representing the ready state of the track resource: 0 <br> = NONE - Text track not fetched 1 = LOADING - Text track is loading, no errors, ready to be added by the parser 2 = LOADED - Text track has been loaded 3 = ERROR - Text track is enabled but cannot be fetched, some data is lost, cannot be fetched correctly. | | --- | --- |