title: HTML5 video error handling
body: <p>I need to tell, whether video cannot be played ("x" sign is shown in browser).</p>
  
  <p>This code does't works. "onerror" event will never be fired under Firefox</p>
  
  <pre><code>var v = document.getElementsByTagName("video")[0];
      if ( v != undefined )
          v.onerror = function(e) {
              if ( v.networkState == v.NETWORK_NO_SOURCE )
              {
                  // handle error
              }
          }
  </code></pre>
  
  <p>What's wrong here ?</p>