HTML Audio/Video DOMerrorProperty
HTML Audio/Video DOM Reference Manual
Example
Get the video's error status.
myVid=document.getElementById("video1");
alert(myVid.error.code);
alert(myVid.error.code);
Try it Yourself »
Definition and Usage
error property returns a MediaError object.
The code property of the MediaError object contains the error state of the audio/video.
Browser Support
![]()
![]()
![]()
![]()
![]()
Only Internet Explorer 9 supports the error property.
Syntax
audio|video.error.code
Return Value
| Type | Description |
|---|---|
| Number | The code property of the MediaError object returns a numeric value that represents the error state of the audio/video:
|
HTML Audio/Video DOM Reference Manualother extensions