HTML Audio/Video DOM readyState Property
❮ HTML Audio/Video DOM Reference
Example
Get the current ready state of the video:
let vid = document.getElementById("myVideo");
alert(vid.readyState);
Try it Yourself »
Definition and Usage
The readyState property returns the current ready state of the audio/video.
The ready state indicates if the audio/video is ready to play or not.
Note: This property is read-only.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
readyState | Yes | 9.0 | 3.5 | Yes | Yes |
Syntax
audio|video.readyState
Return Value
Type | Description |
---|---|
Number | Represents the ready state of the audio/video element:
|
❮ HTML Audio/Video DOM Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.