Created
          August 6, 2020 06:22 
        
      - 
      
 - 
        
Save rozeappletree/81bf627dde09d19cb3f52fc6c60baeaf to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| </head> | |
| <body> | |
| <button onclick="openFullscreen();">Open Video in Fullscreen Mode</button> | |
| <p><strong>Tip:</strong> Press the "Esc" key to exit full screen.</p> | |
| <div id='fs' style='background-color: green'>full!</div> | |
| <script> | |
| var elem = document.getElementById("fs"); | |
| function openFullscreen() { | |
| if (elem.requestFullscreen) { | |
| elem.requestFullscreen(); | |
| } else if (elem.mozRequestFullScreen) { /* Firefox */ | |
| elem.mozRequestFullScreen(); | |
| } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */ | |
| elem.webkitRequestFullscreen(); | |
| } else if (elem.msRequestFullscreen) { /* IE/Edge */ | |
| elem.msRequestFullscreen(); | |
| } | |
| } | |
| </script> | |
| <p>Note: Internet Explorer 10 and earlier does not support the msRequestFullscreen() method.</p> | |
| </body> | |
| </html> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment