This documentation is archived and is not being maintained.
This documentation is archived and is not being maintained.
readyState property
Gets the current state of an audio or video resource.
This property is read-only.
Syntax
JavaScript
state = object.readyState
Property values
Type: ReadyState
The current state of the media resource.
Returns one of the following:
Value
Condition
HAVE_NOTHING
0
No information is available from media resource.
HAVE_METADATA
1
The duration of the media resource is available.
HAVE_CURRENT_DATA
2
Data for the current playback position is available, but not enough to continue playing from this point.
HAVE_FUTURE_DATA
3
Data for the current playback position and data to allow playback to advance a little is available. It usually means the media resource is between the current frame and the following frame.
HAVE_ENOUGH_DATA
4
There is enough data for the playback to continue at the current playback rate without running out of content.