Fullscreen button for iOS with Pano2VR 6

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
User avatar
Hopki
Gnome
Posts: 8562
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Fullscreen button for iOS with Pano2VR 6

Post by Hopki » Sun Apr 29, 2018 6:16 pm

Hi,
Here’s a tip with iOS and the fullscreen button using Pano2VR 6 and action filters.
As you may or may not know iOS does not understand the fullscreen API so it does not work on iPhones or iPads.

What you can do for iOS is use a button that has a Go to URL action opening the projects HTML page in a new window so filling the browser.

So if you have a web page that has a pano displayed in a small window this will open the pano in a new tab filling the browser.
You would then close the tab to return back to the website.

The fullscreen button would use the two actions:

Source: Mouse Click
Action: Fullscreen
Type: Toggle Fullscreen

Then use an Action Filter:
Trigger: Operating System
Comparison: ≠ (not equal)
Value: iOS

The above is saying if the OS is NOT iOS then execute the action.

The next action will be:

Source: Mouse Click
Action: Go to URL
URL: index.html
Target: _blank

Then use an Action Filter:
Trigger: Operating System
Comparison: = (equal)
Value: iOS

So if the OS is iOS then this action will be executed.

So using Action filters the one button will either use the fullscreen action or if it's iOS it will open a new page with the pano.


Regards,
Hopki

BPfeifer
Posts: 6
Joined: Mon Apr 25, 2016 1:10 pm

Re: Fullscreen button for iOS with Pano2VR 6

Post by BPfeifer » Tue May 01, 2018 12:57 pm

Hello Martin,

thanks for this workaround advice.
How is this issue exactly solved on the Pano examples within the GGnome Websise?

For example, when I look on
https://ggnome.com/blue-danube-150th-anniversary
on my ipad (Air, newest iOS) everything works fine.
The fullscreen button is working but I can't see, that it opens or closes another new window.
Or is this just working "silent" in the background and therefore not visible for me?

regards,
Bernd

User avatar
Hopki
Gnome
Posts: 8562
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Fullscreen button for iOS with Pano2VR 6

Post by Hopki » Tue May 01, 2018 1:29 pm

Hi Bernd,
This is because the pano is coded directly into the page and not an iframe.
Not sure if anyone has ever wondered why we call the HTML page a .ggt, Garden Gnome Template.
This was because the HTML page we provided was so people could copy the code into their own web pages, a template for them to use.
It did mean a bit of HTML coding was necessary as you have to change the paths if the folds and JS files would then be placed in a separate folder.

But more and more people just use out template/HTML page and use an iframe.
This is where the fullscreen API brakes with iOS.
Regards,
Hopki

User avatar
Manel
Posts: 31
Joined: Thu May 26, 2016 4:52 pm

Re: Fullscreen button for iOS with Pano2VR 6

Post by Manel » Tue May 01, 2018 3:27 pm

worked for me! thanks!

but be aware, the action:
Source: Mouse Click
Action: Go to URL
URL: index.html

ON THE TOP! if not, doesn't work

and you have to have 2 projects, one with this orders, and one without them

BPfeifer
Posts: 6
Joined: Mon Apr 25, 2016 1:10 pm

Re: Fullscreen button for iOS with Pano2VR 6

Post by BPfeifer » Tue May 01, 2018 3:40 pm

well, as this all is quite new stuff for me....
is there a step by step guide anywhere (maybe here on the forum), how I can use these templates to solve the fullscreen issue on iOS devices ...?

I also tried the workaround using the action filter option within the skin editor.
It does work for me, but when I close the new fullscreen window (after I touched the fullscreen icon for the first time) and touch fullscreen again, it then opens TWO new windows. This keeps going on: I close the two new windows, touch fullscreen on my initial Safari window again and it opens two new ones again ... strange.

thanks,
Bernd

JPeacock
Posts: 9
Joined: Fri Dec 22, 2017 12:59 pm

Re: Fullscreen button for iOS with Pano2VR 6

Post by JPeacock » Wed Jul 18, 2018 12:40 pm

Hello Martin and other commentors,

Given the original post on this by Martin and the subsequent modifications to the method via the replies I wanted to ask whether a more definitive tutorial for this could be written Martin, as I'm really struggling to implement this fix in my projects.

Many thanks,

James

JPeacock
Posts: 9
Joined: Fri Dec 22, 2017 12:59 pm

Re: Fullscreen button for iOS with Pano2VR 6

Post by JPeacock » Wed Jul 18, 2018 12:54 pm

I stand corrected here:

Martin's method seemed to work for me :-) without the additional implementations suggested by Manel.

Manel, I'm curious to know what your reasoning for the 2 project files was and if this is something I need to consider?

Many thanks,

James

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests