Is there a way to force fullscreen for casino games?

Hey all, I’m trying to build out a wiki & forum for casino games—has anyone figured out how to force a web browser into fullscreen mode no matter what kind of computer or device a user is on? My goal is to get folks that are testing/trying out games to be in Fullscreen mode. Would love any insight you have; thanks!

3 Answers

DataDriven
DataDrivenAnswered on 12/22
Best Answer

I hear you, bro! I totally understand how you’d want to fullscreen, as it does add a certain immersion factor. You can programmatically go fullscreen using javascript’s fullscreen api: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API. This works across all major browsers. However, most browsers require user gesture (i.e. clicking a button) to enter fullscreen mode, and some platforms may have security restrictions on this. So the best thing you can do is present a big ol’ “Go fullscreen” button. People are free to not click it, and you’re still hitting your goal of getting people fullscreened. Just be sure to communicate the reason you’re prompting users to enter fullscreen (e.g. “better gamplay experience”, “immersive mode”), so that they’ll be more likely to comply. Hope you get the wiki/forum done soon!

TelemetryReader
TelemetryReaderAnswered on 12/22

There’s really only one “legal” method for opening casino games in fullscreen mode – the Fullscreen API in JavaScript. It’s supported across all browsers and devices, but you’ll need to get the players to click inside the game first, because browsers don’t allow automatic fullscreen (to prevent malicious programs from taking over your screen). You could bind it to a button, or automatically launch it a few seconds after loading. It might not work quite right in some mobile browsers. Be sure to test it there. If you do it well, no one will notice. And if they do, be sure to include the instructions for how to leave fullscreen mode. That’s it.

CompetitiveIntegrity
CompetitiveIntegrityAnswered on 12/23

Yes, there is – the Fullscreen API in JS, which allows you to switch an element (e.g., your canvas) to fullscreen mode and back. Available in all major browsers, with some requiring user confirmation or a click event to activate. Have you tried it? Want me to paste in 5 lines of code?

Your Answer