immersive-web / webvr-polyfill

Use WebVR today, without requiring a special browser build.

Home Page:http://immersive-web.github.io/webvr-polyfill/examples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The polyfill broke down on iOS?

flerokoo opened this issue · comments

Description:

Hello everyone. I'm having troubles making the polyfill work on iphone. It was working good before, but some time ago this error started to pop whenever I enable VR mode:

Screenshot 2020-03-02 at 15 43 48

Here's the part where the error occurs (I guess it's the .play() call)

Screenshot 2020-03-02 at 15 44 13

What can cause such behaviour? Were some kind of breaking changes introduces in recent ios updates?

Additional Information:
  • webvr-polyfill version: 0.10.11
  • Browser name/version/release channel: Safari
  • Operating System: Ios 13.3.1

This looks like the 'nosleep' code, code that ensures device's screen stays on even without user input. There's some work on the WakeLock standard for this, but how it works here is by playing an inline video*, which is failing here it looks like. The error message indicates there was no permission, so guessing that recent media changes (e.g. requiring user action) may have affected that, if this wakelock activation is handled outside of the same 'enter VR' user activation. Although I wouldn't expect that to be the case, there may be some async function that causes this to execute on a separate tick. That's my initial guess

* On older iOS, pictured here, some weird hack to force a redirect and cancel it is used. It's all evil magic, really.