Audio readyState Property
Example
Get the current ready state of the audio:
var x = document.getElementById("myAudio").readyState;
document.getElementById("demo").innerHTML = x;
Try it Yourself »
Description
The readyState property returns the current ready state of the audio.
The ready state indicates if the audio is ready to play or not.
Note: This property is read-only.
Browser Support
Property | |||||
---|---|---|---|---|---|
readyState | Yes | Yes | Yes | Yes | Yes |
Syntax
audioObject.readyState
Return Value
Type | Description |
---|---|
Number | Represents the ready state of the audio element:
|
❮ Audio Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.