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.

Joel

Beginner

  • "Joel" started this thread

Posts: 8

Location: Innsbruck, Austria

Occupation: Interaction- and webdesigner

  • Send private message

1

Tuesday, February 12th 2019, 11:14am

accelerometer/gyroscope sensor access disabled -> will Cardboard VR still work on iOS 12.2?

Hi Klaus,

Quoted

According to an article discussing iOS 12.2 beta features:

> Accessing sensor APIs is now disabled by default, so no accelerometer, gyroscope or magnetometer APIs are working unless the user enables a Settings option under “Safari”
Does this mean Cardboard VR mode won't work anymore in iOS 12.2? *blink*

I have read through this discussion: https://github.com/w3c/deviceorientation…mment-458464696
Which sounds like they might create a popup asking the user for permissions, but perhaps not in time.

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

2

Tuesday, February 12th 2019, 11:45am

Hi,

i think it means that the user first needs to enable the setting before it can use gyro etc..
Which is a nasty and very users unfriendly thing.
I really hope there can be a workaround.
I do quite much government to public information tours for landscape planning stuff, and i'm afraid all these people need to first change these settings on their device, which could stop them to visit.
A pop-up could be best solution for this stupid thing, when it changes the setting by one click. And i hope the pop-up is not to just say that the user needs to go there and there and do this this and this to change it.. *cursing*

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Thursday, February 14th 2019, 6:09pm

i updated to latest OSX and see some things changed.
I use space bar for play pause in 360 video .. also to test in fake webvr mode.
Now it suddenly change the hlookat to 0 every time i click spacebar.

also in a bit more complex situation when i exit vr on desktop it tweens automatically vlookat to 0... wondering why and also why i don't see this when i only use standard webvr xml...


edit: i narrowed it down and of course some is my own 'sloppy-ness' but when i use spacebar when in fake vr to play pause on desktop it sets on every key hit the hlookat to 0.. Why is that? i'm quite sure it was not like that before my OSX update..

It was not like this..
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Feb 14th 2019, 11:10pm)


4

Friday, February 15th 2019, 9:34am

Morning!
I'm also really worried about this! Just read about it in macrumors and looked for a krpano forum post immediately...
This would probably render a lot of tours out there useless (on iOS) and we would have to update all of them *cursing*
As i know apple, they won't make it as simple as providing a popup to allow people to bypass this new "security" "feature"...

5

Friday, February 15th 2019, 4:18pm

Hi,

in the current iOS 12.2 beta versions the gyro support is disabled by default in Safari.

The only way to enable it at the moment would be:
[Homescreen] => [Settings] => [Safari] => enable the motion/orientation access setting

That means that feature will be basically not available for common users with that iOS version.
This affects the gyro plugin and the webvr plugin.

A better solution (beside of keeping to allow sensor usage for the main page) would be for sure a permission dialog to ask the user if the page is allowed to use the gyroscope/acceleration sensors, but I doubt that Apple will do that in that version. Maybe and hopefully in later iOS versions...

One good thing is that other iOS browsers - e.g. Firefox or Chrome are unaffected by that Safari change and are still allowing gyroscope/acceleration sensor usage by default.


edit: i narrowed it down and of course some is my own 'sloppy-ness' but when i use spacebar when in fake vr to play pause on desktop it sets on every key hit the hlookat to 0.. Why is that? i'm quite sure it was not like that before my OSX update..
Sorry, but that doesn't seem to be related - the webvr.xml was always using the SPACE key for 'reseting' the sensor (setting back to 0). Have a look in the webvr.xml for this line and remove it:

Source code

1
onkeydown="if(webvr AND webvr.isenabled AND keycode==32, webvr.resetSensor() );"


Best regards,
Klaus

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

6

Saturday, February 16th 2019, 8:46am

Thanks Klaus,
I totally forgot or missed that...
There is so much to it.
I’m glad that that is the issue and not something else.

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

7

Sunday, February 17th 2019, 2:26pm

hm, would it be possible for the gyro plugin to do

1) a device check for ios 12.2+
2) detect if the setting is disabled (if gyro data is delivered)
3) provide a status variable?

then we could check easily and show a simple js alert,
just for the case the setting is off on a 12.2+ ios device

8

Sunday, February 17th 2019, 8:32pm

Hi,

yes, e.g. in the 'onunavailable' event check for iOS 12.2 and then still do the 'onavailable' code to e.g. show the gyro button:

Source code

1
onunavailable="if(iosversion GE 12.2, onavailable());"


and then in your gyro enabling code (e.g. a button) check for 'isavailable' and again the iOS version and show some information about this case (e.g. how to enable it or to use an other browser):

Source code

1
2
3
<layer name="gyrobutton" ... 
       onclick="if(isavailable == false AND iosversion GE 12.2, ...show some info... ); 
       ...


See here for more:
https://krpano.com/plugins/gyro2/#stateattributes
https://krpano.com/plugins/gyro2/#events

Best regards,
Klaus

9

Friday, March 29th 2019, 3:28pm

i just updated to 12.2 on my iphone 7

i enabled the motion/orientation access setting,
but the gyro still does NOT work here!

tried in normal / private browsing,
restarted my phone,
nothing...

my gyro is dead

*confused*

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

10

Friday, March 29th 2019, 3:30pm

It seems that it also should be on https!!
And then you still need to manually activate it.
Also for chrome etc on ios.
I didn’t update yet.

Mannnn
I go look for another job.

F***** Apple!
Tuur *cursing*
http://www.virtualtuur.com
Skype:studiotuur

11

Friday, March 29th 2019, 3:38pm

thanks tuur !

that worked!

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

12

Friday, March 29th 2019, 3:39pm

Not fully sure, but what i read and understand... yes

*cursing* *thumbdown*
Tuur
http://www.virtualtuur.com
Skype:studiotuur

13

Friday, March 29th 2019, 3:48pm

as a recap for others :

on iOS 12.2+ devices you will need
[Homescreen] --> [Settings] --> [Safari] --> enable the motion/orientation access setting

as users won't know, you'll need a ios 12.2+ detection and then display something like...
" for full experience please enable
the motion/orientation access setting
in home / settings / safari "

HTTPS must be enabled for the server, or it won't work :/

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

14

Friday, March 29th 2019, 3:48pm

When i change to https and type http, does it go automatically to https?

Tuur *angry*
http://www.virtualtuur.com
Skype:studiotuur

15

Friday, March 29th 2019, 3:51pm

When i change to https and type http, does it go automatically to https?

in my case it does, but that might depend on your hosting provider (?)

Tuur

Sage

Posts: 3,128

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

16

Friday, March 29th 2019, 3:53pm

Mmm..we’ll see
But even then..
Pffffffff

Tuur *angry*
http://www.virtualtuur.com
Skype:studiotuur

17

Friday, March 29th 2019, 10:08pm

Hi,

as a recap for others :

on iOS 12.2+ devices you will need
[Homescreen] --> [Settings] --> [Safari] --> enable the motion/orientation access setting

as users won't know, you'll need a ios 12.2+ detection and then display something like...
" for full experience please enable
the motion/orientation access setting
in home / settings / safari "

HTTPS must be enabled for the server, or it won't work :/

Right:
- it's disabled by default
- the user needs to manually enable it
- and it's only HTTPS only now...


Unfortunately (but as expected) Apple has released iOS 12.2 with that stupid behavior, but there is hope for future iOS versions:

The W3C is discussing about a permission-API for the sensor usage - then the user could be directly asked if he would like to allow the sensor usage. That would be much better then generally disabling the usage for everyone. Hopefully Apple will implement that API soon.

You could follow that discussion here:
https://github.com/w3c/deviceorientation/issues/57

Best regards,
Klaus

18

Friday, March 29th 2019, 11:54pm

thanks for the heads-up klaus...

additionally, i noticed that you cant just return to the tour after changing the setting.
you need to reload the page.¨

i now do the gyro/webvr button handling in the onavailable/unavailable events
and i implemented a notice for ios 12.2+ users

hopefully this can be done a bit more user friendly in the future,
but i doubt that it will change soon.

This post has been edited 3 times, last edit by "indexofrefraction" (Mar 30th 2019, 10:45am)


19

Saturday, April 6th 2019, 3:37am

I found that it must use https protocol!

After upgraded to ios12.2, I found that it must use https protocol in safari or other browers, nor the gyro can't not be working.

20

Tuesday, April 9th 2019, 6:34pm

Also, if you have a previous link saved to the iOS desktop as a "web app" with an http url, you will need to recreate that from a new safari page even with https redirects enabled.