Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / HTML5 Fullscreen

Author
Message
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 3rd Oct 2022 10:23
How do I automatically trigger fullscreen (module.requestfullscreen(false,true) when HTML5 app starts? Where do I modify the html? I want to skip the button press...

Dutch
Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 4th Oct 2022 18:27
No, it's not possible - for security reasons accessing full screen requires the user's "permission", and so is tied to browser input events.
marvin944
10
Years of Service
User Offline
Joined: 27th Aug 2013
Location:
Posted: 5th Oct 2022 11:24
So, there is no way to simulate that button press by calling the Javascript attached to it?
Dutch
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 5th Oct 2022 12:55
you could ad the required code to the normal play button and the page can be edited
to only show one button etc. This is frowned upon and you could learn from
https://www.w3schools.com/ this site is free and a great reference
PK
Steve Ancell
18
Years of Service
User Offline
Joined: 16th Feb 2006
Location: Brighton, East Sussex, UK
Posted: 5th Oct 2022 22:51
haliop7
2
Years of Service
User Offline
Joined: 1st Mar 2022
Location:
Posted: 28th Oct 2022 12:46 Edited at: 28th Oct 2022 12:48
What I would do is keep it super simple.

I will take the normal HTML page AppGameKit exports, Change it a bit to my LIKING.
Let the Game LOADS for now... maybe with some nice animation, and once the Loading is complete...


You DO A HuGE ARROW! CLICK ON FULL SCREEN TO CONTINUE.

You can thank me later

So, you do not need to learn JS or something.. Simple y Alto.

EDIT: YOU KNOW WHAT?!?!
I JUST THOUGHT OF AN AMAZING CONCEPT THAT ShOULKD WORK FOR ALL OF US.



THE MAIN SCREEN OF THE GAME, OR, THE LOADING SCREEN.
Take a snapshot, and put it behind the AppGameKit VIEWPORT IN THE HTML5 PAGE.
THEN, ASK TO TOUCH THE FULL-SCREEN BUTTON BENEATH TO CONTINUE, SO IT WILL LOOK LIKE IT IS JUST LIKE THAT.
AND YOU CAN FAKE WRITE "*this viewport is small, so it will fit all devices" in the HTML Paragraph, "and Do not worry, See this button? "

Login to post a reply

Server time is: 2024-04-19 01:59:44
Your offset time is: 2024-04-19 01:59:44