Easy Tutorial
❮ Prop Screen Colordepth Prop Style Borderimageslice ❯

Video error Property

Video Object

Example

Get the error status of the video:

var x = document.getElementById("myVideo").error.code;

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

Only Internet Explorer supports the error property.

Note: Internet Explorer 8 and earlier versions do not support this element.


Syntax

Return Value

Type Description
Number The code property of the MediaError object returns a numeric value representing the error status of the audio/video: 1 = MEDIA_ERR_ABORTED - Retrieval process was aborted by the user<br>2 = MEDIA_ERR_NETWORK - Error occurred while downloading<br>3 = MEDIA_ERR_DECODE - Error occurred while decoding<br>4 = MEDIA_ERR_SRC_NOT_SUPPORTED - Audio/video not supported
❮ Prop Screen Colordepth Prop Style Borderimageslice ❯