HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> video{ width:100%; height:330px } </style> </head> <body> <video id="myVideo" controls> <source src="/hawk.mp4" type="video/mp4"> </video> <p><strong>Note</strong>: 'requestFullscreen()' method can only be initiated by a user gesture, not by a programmer himself.</p> <script> var x = document.getElementById("myVideo"); x.requestFullscreen(); x.addEventListener("fullscreenerror", function(event){ setTimeout(function(){ alert("Unable to switch into full-screen mode."); }, 1000); }); </script> </body> </html>
OUTPUT
×

Save as Private