YouTip LogoYouTip

Prop Video Error

# Video error property [![Image 8: Video Object Reference Manual](#) Video Object](#) ## Example Get the error state of the video: var x = document.getElementById("myVideo").error.code; [Try it Yourself Β»](#) * * * ## Definition and Usage The error property returns a MediaError object. The code property of the MediaError object contains the error state of the audio/video. **Note:** This property is read-only. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) Only Internet Explorer supports the error property. **Note:** Internet Explorer 8 and earlier versions do not support this element. * * * ## Syntax _videoObject_.error.code ## Return Value | Type | Description | | --- | --- | | Number | The code property of the MediaError object returns a number value that represents the error state of the audio/video: * 1 = MEDIA_ERR_ABORTED - The fetching process was aborted by the user agent * 2 = MEDIA_ERR_NETWORK - A network error occurred while downloading the resource * 3 = MEDIA_ERR_DECODE - An error occurred while decoding the resource * 4 = MEDIA_ERR_SRC_NOT_SUPPORTED - The audio/video is not supported | * * Video Object](#)
← Prop Video ErrorProp Video Ended β†’