Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()" type="button">Get error state</button><br> <video id="myVideo" width="320" height="176" controls autoplay> <source src="mov_broken.mp4" type="video/mp4"> <source src="mov_broken.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video> <p>Video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p> <p><strong>Note:</strong> This property is only supported in Internet Explorer 9 and newer versions.</p> <script> var vid = document.getElementById("myVideo"); function myFunction() { alert(vid.error.code); } </script> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_av_prop_error by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:09:53 GMT --> </html>
Result:
Try it Yourself - © w3schools.com