immersive-web / webxr-samples

Samples to demonstrate use of the WebXR Device API
https://immersive-web.github.io/webxr-samples/
MIT License
995 stars 479 forks source link

Add button on iOS to request motion permissions to allow WebXR #71

Open ivnnv opened 4 years ago

ivnnv commented 4 years ago

iOS 13.4 requires sites to be https and having the user manually triggering and granting permissions, otherwise any WebXR or WebVR features wont work. This PR checks if the device run iOS and shows a message and the button that triggers the system prompt. PS: this PR also updates the polyfill to its latest version: 0.10.11

req-perms

prompt

Heres' the build for this PR: https://ivnnv.github.io/webxr-samples/ Anyway the polyfill has a bug and the demos wont work, but ill reporting that on its repo.

aykutarici commented 4 years ago

Hello, I tried to test this pr but, there is "your browser does not support webxr" error and permission button does not shown on. Tested with;