Video error attribute
Definition and usage
error
The property returns a MediaError object.
The MediaError object provides a code property that contains the video error state.
Note:This property is read-only.
Example
Get the video error state:
var x = document.getElementById("myVideo").error.code;
Syntax
videoObject.error.code
Return value
Type | Description |
---|---|
Number |
The code property of the MediaError object returns a number representing the video error state:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Not Supported | 9.0 | Not Supported | Not Supported | Not Supported |