HTML Audio/Video DOM error attribute
Example
Obtaining the error status of the video:
myVid=document.getElementById("video1"); alert(myVid.error.code);
Definition and Usage
The error attribute returns a MediaError object.
The code property of the MediaError object contains the audio/video error state.
Browser Support
Only Internet Explorer 9 supports the error attribute.
Syntax
audio|video.error.code
Return Value
Type | Description |
---|---|
Numeric Value |
The code property of the MediaError object returns a numeric value indicating the audio/video error state:
|