You are not logged in.

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 242

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: 242

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!