You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Friday, April 26th 2019, 11:33am

Set a specific VR headset on startup / onunkowndevice


I would like to set a specific headset (from the predefined vrheadsets-list) on startup or alternatively in the "onunknowndevice" event. Ideally I would like to use the name of the headset to set it.
Can anyone provide help or a code snippet? I found a function which can get and set the next or previous headset and I can set the different values but the best thing would be to be able to set based on the name and show the current selected value in the combobox (VR setup screen).

Thanks in advance!


Friday, April 26th 2019, 2:34pm

i noticed that the new iphones are not recognized,
this is a problem, because quite a lot of people have them by now...

i had an Xr in my hands yesterday and i also had todisable tabs in the preferences, first



Friday, April 26th 2019, 4:25pm

I'm just not sure how this helps with my problem :/ ;)


Friday, April 26th 2019, 5:21pm

not at all, it just adds up! ;-)


Monday, April 29th 2019, 11:53am

@klaus ...

the onunkowndevice message is kind of a problem...

there has been no update for 12 months and
mayor players like the Xr are not detected/have no default values

no pressure on pr17, but wouldnt it be possible
to release an intermediate version with updated device data for webvr?

also the ui fixes for these devices would be highly appreciated!

best, index


Tuesday, April 30th 2019, 5:14pm

Any suggestions beside the iPhone issues?

We want to select a standard headset if the user has not selected another headset and saved his settings. Whatever we try only "No distortion" is selected :/


Monday, May 6th 2019, 2:32pm



Tuesday, May 7th 2019, 9:25am

What do you mean by only "No distortion" is selected ?

if i get unknown device (X phones, Huawei P20, etc),
i can select a VR Headset.

are you trying on desktop?
otherwise you might have messed up something in your tour *whistling*

... for your other question, check webvr.xml
actions vr_setup_select() and vr_setup_change_headset() look interesting

This post has been edited 1 times, last edit by "indexofrefraction" (May 7th 2019, 9:37am)


Tuesday, May 7th 2019, 11:55am


any behavior is possible here, the webvr.xml is only an example implementation.

E.g. have a look into the 'webvr_onunknowndevice' <action> there (it's called by the onunknowndevice event).

There just directly set the default settings for that case and remove the if and the 'ask_user_for_screensize' case.

Btw - in the next krpano release that will all changed a bit, there also no asking will be done by default.

Best regards,


Wednesday, May 8th 2019, 9:41am

Thank you for the answer but I've tried that already:

That's what I'm doing:

Source code

if(webvr.havesettings == false,set(webvr.mobilevr_lens_overlap, 1.15);set(webvr.mobilevr_lens_fov, 100.0);set(webvr.mobilevr_lens_dist, 0.33);set(webvr.mobilevr_lens_dist2, '1|0|0|0');set(webvr.mobilevr_lens_ca, 0.000);set(webvr.mobilevr_lens_vign, 100);,set(webvr.ask_user_for_screensize, true););

I've defined a headset like this:

<headset name="mcb" caption="Mr. Cardboard" overlap="1.15" fov="100.0" dist="0.33" dist2="1|0|0|0" ca="0.000" vig="100" />

And there is no other headset with similar settings.

It won't set these settings (or rather: it is hard to find out whether this is a caching problem of the mobile browser), nor is the "Mr. Cardboard" setting preselected in the headset section, it always seems to default to "No distortion".


Wednesday, May 8th 2019, 9:49am

Never mind, seems to be a caching issue on the client :/