Set a specific VR headset on startup / onunkowndevice

  • Hello,

    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!

  • 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

  • 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 :/

  • 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

  • Hi,

    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,

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

    That's what I'm doing:

    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".

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!