Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript full screen exits when user navigates around site

I have a series of pages that have "next" and "back" buttons. I would like the user to be able to go fullscreen through the whole flow. Fullscreen is working for individual pages but exits when the user goes back or forwards a page in my flow.

My fullscreen function:

    var el = document.documentElement, rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen;
rfs.call(el);

Is there any way to keep the browser in full screen when the user navigates around?

Thanks!

like image 565
alex9311 Avatar asked Jul 22 '13 17:07

alex9311


1 Answers

For internal application I use solution with fullscreen iframe - simple page like this:

...
<body>
    <iframe id="ifr" frameborder="0" width="XXX" height="XXX" src="normal-page-with-links.html"></iframe>
</body>
...

And this page is fullscreen in browser and navigation in iframe content stays in fullscreen.

like image 146
user2239613 Avatar answered Sep 28 '22 05:09

user2239613