Latest web development tutorials

HTML DOM Video error property

Video Object Reference Video Object

Examples

Get the error state of the video:

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

try it"

Definition and Usage

property returns an error MediaError object.

MediaError object code property contains the error status of audio / video.

Note: This property is read-only attribute.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Only Internet Explorer browsers support error property.

Note: Internet Explorer 8 and earlier versions of IE do not support the element.


grammar

videoObject .error.code

return value

Types of description
Numeric values

code property MediaError object returns a numeric value that represents the error status Audio / Video:

  • 1 = MEDIA_ERR_ABORTED - retrieval process is aborted by user
  • 2 = MEDIA_ERR_NETWORK - An error occurred when downloading
  • 3 = MEDIA_ERR_DECODE - An error occurred while decoding
  • 4 = MEDIA_ERR_SRC_NOT_SUPPORTED - does not support audio / video


Video Object Reference Video Object