Video error property
Example
Get the error state of the video:
var x = document.getElementById("myVideo").error.code;
Try it »
Definition and Usage
The error attribute returns a MediaError object.
The code attribute of the MediaError object contains the error status of the audio/video.
Note: This attribute is read-only.
Browser support





Only the Internet Explorer browser supports the error property.
Note: Internet Explorer 8 and earlier IE versions do not support this element.
Syntax
videoObject
.error.code
Return Value
| Type | Description |
|---|---|
| Numeric value |
The code property of the MediaError object returns a numeric value representing the error state of the audio/video: |
The Video object