webXR out of iframe

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
Posts: 88
Joined: Wed Mar 06, 2013 4:22 pm
Location: Germany

Fri Apr 30, 2021 1:40 pm

is there any good workaround to handle webXR from out of iframes, especially on a joomla site? When opening this site on a mobile phone (= webXR available) the split screen opens within the iframe naturally.

When addressing the index.html directly all works fine.

Tried to open an info-popup, that advises to open fullscreen first or to visit the direct link to the index.html. However this popup doesn´t show if vr is available and webvr is started by clicking the respectiv button, of course.
Also tried to combine action "start fullscreen" and "start vr", without any help. Also wouldn´t help for Iphone, I think.
Thought about a logicblock to activate webVR only if screenwidth > iframe width.

Perhaps someone figured out an elegant way to handle webXR in iframes?

Thank you for any idea.
User avatar
Posts: 11369
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK

Sat May 01, 2021 9:45 pm

What you can have is a text box that shows when Is Mobile is detected.
The Text Box could say something like "Enable VR", then this would have a Go-To URL action to open a new page.
THne you can use the WebVR button.
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
Posts: 88
Joined: Wed Mar 06, 2013 4:22 pm
Location: Germany

Mon May 03, 2021 2:43 pm

I use this to get fullscreen on iphones.
But if I use a hidden link within this textbox to get a new tab the textbox will appear again when selecting webXR, because Mobile is still detected. So I always will get a new tab and activation of webXR won't be possible until I use a non mobile device...
Posts: 88
Joined: Wed Mar 06, 2013 4:22 pm
Location: Germany

Tue May 04, 2021 11:12 am

Ok, here is my solution (in case someone has the same problem):

within the original version (the iframe version) the VR-mode button opens a textbox as Hopki suggested. Logicblock: if VR not available: "Sorry, no go...", if VR available: "You will be redirected to webXR version. There click VR again." Action mouseclick go to url (this also helps to get fullscreen even on iphone).

In my project now I change my skin. VR button action now "enter VR". Otherwise you always get the textbox, linking to your url, where you get the textbox again, and so on.
Before outputting again change HTML setting to "output/webxr.html", skinfile to "skinwebxr.js" and "output/webxr.xml". Leave the rest as before.

After generating your output you are using the same tiles and images as before but you get an additional webxr.html, webxr.xml and skinwebxr.js

Now in the first/original/iframe version skin adjust the VR-Button action mouseclick go to url ...(your path)/webxr.html.

You are working with two versions within one project. I hope this was helpful for someone.
If there is a more elegant solution please tell me.
Post Reply