Bug 201676 - unable to use VR - cannot access devicemotion event on Safari 13 on iOS
Summary: unable to use VR - cannot access devicemotion event on Safari 13 on iOS
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: iPhone / iPad Other
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-10 23:15 PDT by Oren Me
Modified: 2019-09-17 17:02 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oren Me 2019-09-10 23:15:15 PDT
trying to query for window.DeviceMotionEvent gives back a warning message "No device motion or orientation events will be fired until permission has been requested and granted.".
I can't see API to request permission and this is a regression from iOS12 where this worked.
This event is used to get critical information for 360 and VR applications.
Also, the permission settings in the general device settings to allow access has been removed, as it seems, so I can't find a way to ask or set the permission.
Comment 1 Radar WebKit Bug Importer 2019-09-17 08:37:53 PDT
<rdar://problem/55440172>
Comment 2 Chris Dumez 2019-09-17 17:02:26 PDT
You need to use the DeviceOrientation / DeviceMotion API to request permission to access this data (with a user interaction), which will prompt the user.

See:
https://w3c.github.io/deviceorientation/spec-source-orientation.html#dom-deviceorientationevent-requestpermission
https://w3c.github.io/deviceorientation/spec-source-orientation.html#dom-devicemotionevent-requestpermission

It was standardized.