YouTip LogoYouTip

Prop Video Readystate

# Video readyState Property [![Image 8: Video Object Reference](#) Video Object](#) ## Example Get the ready state of the video: ```javascript var x = document.getElementById("myVideo").readyState; document.getElementById("demo").innerHTML = x; _x_ output result: 4 // Indicates there is enough data to start playing [Try it Β»](#) * * * ## Definition and Usage The readyState property returns the current ready state of the video. The ready state indicates whether the audio/video is ready to play. **Note:** This property is read-only. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the readyState property. **Note:** Internet Explorer 8 or earlier browsers do not support this property. * * * ## Syntax ```javascript _videoObject_.readyState ## Return Value | Type | Description | | --- | --- | | Number | Represents the ready state of the audio/video element: * 0 = HAVE_NOTHING - No information about whether audio/video is ready * 1 = HAVE_METADATA - Metadata for audio/video ready * 2 = HAVE_CURRENT_DATA - Data for the current playback position is available, but not enough data to play the next frame/millisecond * 3 = HAVE_FUTURE_DATA - Data for the current and at least next frame is available * 4 = HAVE_ENOUGH_DATA - Enough data available to start playing | * * Video Object](#)
← Jsref FilterJsref Every β†’