You are not logged in.

Dear visitor, welcome to krpano.com 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.

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 382

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

1

Friday, July 12th 2019, 12:45am

Testing if viewing in headset

How do I test if a tour is being viewed in any headset?
Subquestion: how do you test if that headset is using Google Cardboard?

2

Friday, July 12th 2019, 7:44am

have a look at:
https://krpano.com/plugins/webvr/#ismobilevr
https://krpano.com/plugins/webvr/#isgearvr
https://krpano.com/plugins/webvr/#iswebvr
https://krpano.com/plugins/webvr/#isfake

i use something like

function webvr_state() {
return krpano.webvr && krpano.webvr.isenabled ? krpano.webvr.isfake ? krpano.webvr.iswebvr ? 3 : 1 : 2 : 0;
}

0=off, 1=fake, 2=mobile, 3=true webvr (oculus go, rift, etc)
google cardboard is 2, not sure about gearvr.. 2? 3?

This post has been edited 1 times, last edit by "indexofrefraction" (Jul 12th 2019, 9:14am)


Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 382

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

3

Saturday, July 13th 2019, 5:46am

not sure about gearvr.. 2? 3?

I expect it would be 3 (true webvr) since isgearvr is true for gearvr and any Oculus hardware. I will have to play with this when I get back in town.

Thanks!

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 382

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

4

Thursday, July 18th 2019, 6:53pm

A Test Page

I put together a page testing the various WebVR states. You can try it here: tdf360.com/test/webvr. Here is what I found (when WebVR is available, before you enter VR):

webvr.iswebvr == true only and always in a headset, at least on Gear VR, Go and probably other Oculus headsets. This is true even if you aren't in VR mode or if the VR browser is in desktop mode.

webvr.isgearvr == true only in a headset, at least on Gear VR, Go and probably other Oculus headsets. This is true even if you aren't in VR mode but is not true if the VR browser is in desktop mode. I hope someone can test this in other headsets.

So, if isgearvr is true iswebvr will also be true. It seems the only way to know if you are in a headset with the browser in vr mode (the default) is if isgearvr is true.

webvr.isfake == true only on desktops. (ismobilvr will also always be true on a desktop.)

webvr.ismobilevr == true means "cardboard" if webvr.isfakevr == false. This is true for my mobile devices (galaxy, iphone and ipad) regardless of browser. I don't think there is a way to tell if you are viewing in a cardboard headset.

Why is this important? I want to know if the tour is being viewed in a real VR headset so I can set appropriate splash dialog and screen options. For example clicking the start button alway drops you into VR. If someone really wants to view the non-VR version they can click the browser's desktop mode button. When dropping out of VR mode, which happens whenever you take off the headset[edit: on Gear VR but not GO], I want to be sure none of the desktop version starts showing and that you have a button to take you back into VR. That is something you wouldn't want on a desktop or device that isn't a headset.

Please Test: if others could share results on other headsets from HTC, Daydream, etc it would be appreciated. I'm especially curious if isgearvr and iswebvr are true in other headsets.

Sidenote: On a desktop , if you actually turn off FakeVR by setting plugin[webvr].mobilevr_fake_support = false, all the tests will show false except isWebVR will be true. No idea why.

This post has been edited 6 times, last edit by "Scott Witte" (Jul 24th 2019, 6:53am) with the following reason: made corrections


5

Saturday, November 23rd 2019, 6:28am

Pico is not mobilevr but is mobile

That's really helpful Scott!
What's irritating is that the Pico headset reads as gearVR, webVR but not mobileVR. It does however read as mobile!!

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 382

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

6

Saturday, November 23rd 2019, 4:03pm

Remember that this test was built with v1.19.16. The current version may work a little differently.

Are you using the Pico G2 4K headset? What is your impression of image quality and performance?

7

Sunday, November 24th 2019, 7:33pm

Hi,

just as note - in 1.20 you can check the isvrbrowser setting:
https://krpano.com/plugins/webvr/#isvrbrowser

Best regards,
Klaus