I’m progressing along with embedded content in an iFrame and trying to solve my last remaining issue. How to set some kind of variable or logic block to either show the content in an iFrame OR, if on a mobile device - jump directly to the URL in a separate page.
When opening on iPhone the iFrame is too small and doesn’t scale well. A bigger problem is that the mouse roll out action I am using to make the iFrame invisible doesn’t work. Maybe I could use a button for closing the frame instead? But I think I would just rather redirect the user to the actual web page if they are on a mobile device.
Can you explain how I set that up so that the Url link is opened normally in the iFrame if on a desktop computer but redirects to a separate page if on mobile?
FYI: I’m using Pano2VR 5.
I am also embedding a gLTF model using ModelViewer - example can be seen here:
http://www.gotlibdesign.com/p2vrtest/0utput3/index.html
Open URL in iFrame on desktop but redirect to separate browser page if on mobile?
You can use Action for your button. In the Action choose.
Source: Mouse click
Action: Go to URL
URL: your URL (page adress for mobile)
Target: _blank
Then click button with two arrows in bottom left corner.
Add new record:
Player - Is mobile = true
And add another Action:
Source: Mouse click
Action: Go to URL
URL: your URL (text block with frame for PC)
Target: _blank
Then click button with two arrows in bottom left corner.
Add new record:
Player - Is mobile = false.
But I do not know is there this function in 5v Pano2VR. You can update app.
Source: Mouse click
Action: Go to URL
URL: your URL (page adress for mobile)
Target: _blank
Then click button with two arrows in bottom left corner.
Add new record:
Player - Is mobile = true
And add another Action:
Source: Mouse click
Action: Go to URL
URL: your URL (text block with frame for PC)
Target: _blank
Then click button with two arrows in bottom left corner.
Add new record:
Player - Is mobile = false.
But I do not know is there this function in 5v Pano2VR. You can update app.
- Attachments
-
- Screenshot 2023-06-02 000630.png (11.95 KiB) Viewed 1527 times
Unfortunately, I'm not in a position to upgrade at the moment and v5 seems not to have that additional logic setting in the actions box. Is there no other way to do this?
- Attachments
-
- Screenshot 2023-06-02 at 12.45.30 AM.png (133.94 KiB) Viewed 1517 times
You can create 2 different tours and setup this logic by CMS for example. If you have access to the hosting of course. Wordpress witn Elementor plugin can enable different blocks in depending of device type.
Yes that is what I did I found a simple javascript to redirect for mobile devices that seems to work well. The only problem I'm now having is that my goto URL action in the skin (when redirected for mobile) is for some reason opening two pages on iPhone. I can't figure out why it is doing this and looking into preparing a "support package."