I’m trying to add a toggle to switch to fullscreen, in my app.
I am calling the
scene.getEngine().switchFullscreen but I am wondering if Babylon already provides functionality to deal with all the fullscreen edge cases across the different platforms.
On the iPad, trying to move the camera (pulling down) comes out of fullscreen instead.
On iframe it doesn’t quite go fullscreen (probably depends on the parent container size, my bad).
On the iPhone it doesn’t seem to do anything, but would be cool to switch into fullscreen with optional landscape transition (similar to YouTube).
Anyone knows of a way to help with managing fullscreen?
switchFullscreen is meant to do that. @RaananW might know more about some of the issues you are facing ?
iOS and fullscreen…
Apple doesn’t support the fullscreen API, so there is little to do here sadly. the iPad issue is interesting though. I guess it is the gesture to leave fullscreen and there is little we can do about it because it is on the browser level and i doubt they will let us override this.
Apple should fix their browser. Or at least support web standards.
** just a PS - we do use webkitFullscreen under the hood if it is available, so there is nothing to do on your side.
I see… this helps a lot as I was already spending some time figuring out how to disable some of the browser gestures.
On the iPhone is there any easy support for pretending to be full screen by both rotating and hiding the top bar?
I’ll research another time
By the way, Babylon is really well done and I’m loving working in it!
I haven’t found a way to hide the bar on the new iPhones/Safari, unfortunately.
Let me know if you do!
You can ask the user to install as PWA and then you can be full screen.