Bug 201676

Summary: unable to use VR - cannot access devicemotion event on Safari 13 on iOS
Product: WebKit Reporter: Oren Me <oren.me>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Major CC: bfulgham, cdumez, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: Other   

Oren Me
Reported 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2019-09-17 08:37:53 PDT
Chris Dumez
Comment 2 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.
Note You need to log in before you can comment on or make changes to this bug.