Video readyState property
Example
Get the readiness state of the video:
var x = document.getElementById("myVideo").readyState;
document.getElementById("demo").innerHTML = x;
x The output result is:
4 // Indicates that there is enough data to start playing
Try it »
Definition and Usage
The readyState property returns the current readiness state of the video.
The readiness state indicates whether the audio/video is ready to play.
Note: This property is read-only
Browser support





All major browsers support the readyState property
Note: Internet Explorer 8 or earlier browsers do not support this attribute.
Syntax
videoObject
.readyState
Return Value
| Type | Description |
|---|---|
| Digit |
Represents the readiness state of the audio/video element: |
The Video object