Audio errorProperty
Example
Get the audio error status:
var x = document.getElementById("myAudio").error.code;
Try it yourself »
Definition and Usage
The error property returns a MediaError object.
The code property of the MediaError object contains the error status of the audio/video.
Note:This property is read-only.
Browser Support
![]()
![]()
![]()
![]()
![]()
Currently, only Internet Explorer browser supports the error property.
Note:Internet Explorer 8 and earlier IE versions do not support this property.
Syntax
audioObject.error.code
Return Value
| Type | Description |
|---|---|
| Numeric value |
The code property of the MediaError object returns a numeric value that represents the error status of the audio:
|
Audio Object Other Extensions