English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The readyState property returns audio/The current ready state of the video.
HTML Audio/Video DOM Reference Manual
Get the video readiness state:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML Audio/Video readyState property usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <button onclick="getReadyState()" type="button">Get the video readiness state</button> <br> <video id="video1" controls="controls"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support HTML5 video tag. </video> <script> myVid = document.getElementById("video1"); function getReadyState() { alert(myVid.readyState); } </script> </body> </html>Test and see ‹/›
The readyState property returns the audio/The current ready state of the video.
Ready state indicates audio/Whether the video is ready to play.
Note: This property is read-only.
IEFirefoxOperaChromeSafari
All major browsers support the readyState property.
Note:Internet Explorer 8 and earlier versions do not support this property.
audio|video.readyState
Type | Description |
---|---|
Number | Represents audio/Video (audio/Ready state of the (audio) element:
|