Ryanthehouse Ryanthehouse - 29 days ago 5
Javascript Question

Trigger Browser Full Screen Mode via Javascript

When a YouTube video goes full screen, it is relative to the monitor rather than the browser.

How can I trigger a browsers full screen mode to display a webpage relative to the monitor with JS?


There's a fullscreen browser API in most modern browsers. You can invoke them in Javascript with commands like


More info at https://www.sitepoint.com/use-html5-full-screen-api/

Keep in mind you'll have to add much more fullscreen handling code in addition to this.