const vid = document.getElementById('video-id'); vid.requestFullscreen();
If you want to allow site visitors to watch a video on your site in full-screen mode you can simply achieve this by calling the
requestFullscreen method on the video element.
requestFullscreen() method asks the user agent to place the specified element into full-screen mode, removing all of the browser's UI elements as well as all other applications from the screen. Returns a
Promise which is resolved once full-screen mode has been activated.