Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The polyfill broke down on iOS? #354

Open
flerokoo opened this issue Mar 2, 2020 · 1 comment
Open

The polyfill broke down on iOS? #354

flerokoo opened this issue Mar 2, 2020 · 1 comment

Comments

@flerokoo
Copy link

flerokoo commented Mar 2, 2020

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
@jsantell
Copy link
Contributor

jsantell commented Mar 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants