Example
Get the current ready state of the video:
var x = document.getElementById("myVideo").readyState;
document.getElementById("demo").innerHTML = x;
The result of x could be:
4 // Indicates that there is enough data available to start playing
Try it Yourself »
Definition and Usage
The readyState property returns the current ready state of the video.
The ready state indicates if the video is ready to play or not.
Note: This property is read-only.
Browser Support
The readyState property is supported in all major browsers.
Note: This property is not supported in Internet Explorer 8 and earlier.
Syntax
videoObject.readyState
Return Value
Type | Description |
---|---|
Number | Represents the ready state of the video element:
|
< Video Object