Skip to content
Related Articles

Related Articles

HTML | DOM Video error Property
  • Last Updated : 30 Nov, 2019

The DOM Video error property is used to return the MediaError object and MediaError object contains error state of Video.



Return Type: This property returns a numbers which represents the error state of the video:

  • 1 = MEDIA_ERR_ABORTED – User aborted fetching process
  • 2 = MEDIA_ERR_NETWORK – error occurred at the time of downloading
  • 3 = MEDIA_ERR_DECODE – error occurred at the time of decoding
  • 4 = MEDIA_ERR_SRC_NOT_SUPPORTED – video are not supported


<!DOCTYPE html> 
        Video error Property 
<body style="text-align: center"
    <h1 style="color: green"
    <h2 style="font-family: Impact"
        Video error Property 
    <video id="Test_Video" width="360"
        height="240" controls> 
        <source id="mp4_source" src="sample2.mp4"
        <source id="ogg_source" src="sample2.ogg"
    <button ondblclick="My_Video()"
        Return Error State
    <p id="test"></p
        function My_Video() { 
            var v = document.getElementById( 
                   ).innerHTML = v; 


Supported Browser: The browser supported by HTML DOM Video error Property are listed below:

  • Internet Explorer

My Personal Notes arrow_drop_up
Recommended Articles
Page :