YouTip LogoYouTip

Prop Track Readystate

HTML DOM Track readyState Property

HTML DOM Track readyState Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Time Object

HTML DOM Video Object

Track readyState Property

Track Object Reference Track Object

Example

Get the current ready state of the track resource:

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

x output value is:

2 // The 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 ExplorerFirefoxOperaGoogle ChromeSafari

The readyState property is supported in Internet Explorer, Opera, and Chrome.

Note: Firefox, Safari, or Internet Explorer 9 and earlier versions do not support the readyState property.


Syntax

trackObject.readyState

Technical Details

Return Value: A number indicating the ready state of the track resource:
  • 0 = NONE - Text track not obtained
  • 1 = LOADING - Text track is loading, no errors occurred, and it can be added to the track by the parser next
  • 2 = LOADED - Text track has been loaded
  • 3 = ERROR - Text track is enabled, but the user cannot obtain it, some data has been lost, and it cannot be obtained correctly.

Track Object Reference Track Object

HTML DOM Time Object

HTML DOM Video Object

iFlytek Xingchen Coding Plan includes free model call quotas, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Subscribe Now

Click to Share Notes

Cancel

← Dom Obj VideoProp Track Srclang β†’