Latest web development tutorials

HTML DOM Video readyState property

Video Object Reference Video Object

Examples

Get ready video:

var x = document.getElementById ( "myVideo") readyState.;
. Document.getElementById ( "demo") innerHTML = x;

x The output is:

4 // indicates there is enough data to start playing

try it"

Definition and Usage

readyState property returns the current video ready.

Ready Status Indication audio / video if ready to play.

Note: This attribute is readonly


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support readyState property

Note: Internet Explorer 8 or earlier browser does not support this property.


grammar

videoObject .readyState

return value

Types of description
digital

Ready indicates the audio / video elements:

  • 0 = HAVE_NOTHING - no information on the audio / video of readiness
  • 1 = HAVE_METADATA - metadata about audio / video ready
  • 2 = HAVE_CURRENT_DATA - Data on the current playback position is available, but there is not enough data to play the next frame / ms
  • 3 = HAVE_FUTURE_DATA - at least the next frame and the current data are available
  • 4 = HAVE_ENOUGH_DATA - available data enough to start playing


Video Object Reference Video Object