HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> video{ width:100%; height:330px } </style> </head> <body> <video controls> <source src="/hawk.mp4" type="video/WMV"> </video> <script> var x = document.getElementsByTagName("source")[0]; function myFunction(){ alert("This video is in mp4 format"); } x.addEventListener("error", myFunction); </script> <p><strong>Note</strong>: Change type="video/WMV" to type="video/mp4" and then click 'Run' button</p> </body> </html>
OUTPUT
×

Save as Private