Video readyState attribute
Definition and usage
readyState
The property returns the current ready state of the video.
The ready state indicates whether the video can be played.
Note:This property is read-only.
Example
Get the current ready state of the video:
var x = document.getElementById("myVideo").readyState; document.getElementById("demo").innerHTML = x;
Syntax
videoObject.readyState
Return value
Type | Description |
---|---|
Number |
Indicates the ready state of the video element:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Support | Support | Support |