Easy Tutorial
❮ Jsref Escape Prop Base Href ❯

Audio readyState Property

Audio Object

Example

Get the ready state of the audio:

x Output result:


Definition and Usage

The readyState property returns the current ready state of the audio.

The ready state indicates whether the audio is ready to play.

Note: This property is read-only.


Browser Support

All major browsers support the readyState property.

Note: Internet Explorer 8 and earlier versions do not support this property.


Syntax

Return Value

Type Description
Number Represents the ready state of the audio element: 0 = HAVE_NOTHING - No information whether the audio is ready<br> 1 = HAVE_METADATA - Metadata about the audio's readiness<br> 2 = HAVE_CURRENT_DATA - Data for the current playback position is available, but not enough data to play next frame/millisecond<br> 3 = HAVE_FUTURE_DATA - Data for the current and at least the next frame is available<br> 4 = HAVE_ENOUGH_DATA - Enough data is available to start playing
❮ Jsref Escape Prop Base Href ❯