Page 1 of 1

webXR out of iframe

Posted: Fri Apr 30, 2021 1:40 pm
by MPW
Hello,
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.

Re: webXR out of iframe

Posted: Sat May 01, 2021 9:45 pm
by Hopki
Hi,
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.
Regards,

Re: webXR out of iframe

Posted: Mon May 03, 2021 2:43 pm
by MPW
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...

Re: webXR out of iframe

Posted: Tue May 04, 2021 11:12 am
by MPW
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.