Open arathore-gaming opened 2 years ago
@arathore-gaming how about enter full screen by default? Do you need a way to exit full screen mode?
@minggo, yes agree -
enter full screen by default (is it possible on iOS safari???)
I am not sure, just collect requirements, then we will do research to finish it.
An event to notify back in code about full screen enter and exit
Yep, i think can reuse resize event.
I am not sure, just collect requirements, then we will do research to finish it.
Okay, so just checked and the browsers doesn't allow enter full screen by default.
So the req would be - iOS - Swipe to full screen (An overlay to swipe up) & a button to Exit full screen (Dev's should be able to customize Swipe up message) Android & Other OS: Touch to full screen (An overlay on which user can touch to go full screen)
I hope this clarifies the req!
How about add a method named setFullScreen(bool)
? Then can just invoke it to enter/exit full screen?
Just a method won't work as for iOS a swipe up div would be required. The most important part is to create the div with required additional height to achieve a smooth swipe behavior and remove the div as soon as game enters full screen
Is there any documentation about it?
nope, can't find a document around this requirement
Use Case
I am working on a mobile web game which will work on browsers like safari, chrome etc. The game looks best when the gam is in full screen
Problem Description
Currently browsers like Safari doesn't provide a simple way to go full screen and chrome has got a simple but diffrent way of full screen
Proposed Solution
Proposed solution is to develop a generic solution within cocos creator to create a simple interface which can be used to go full screen.
For Safari: a Swipe up overlay which will work across diffrent iOS versions For Chrome, etc. - an overlay to touch and go full screen
How it works
No response
Alternatives Considered
Alternatively a plugin can also be introduced for the same but heaving it in cocos creator itself would make more sense
Additional Information
No response