Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

requestAnimationFrame recursion on mobile #127

Closed
itsthisjustin opened this issue Feb 12, 2018 · 12 comments
Closed

requestAnimationFrame recursion on mobile #127

itsthisjustin opened this issue Feb 12, 2018 · 12 comments
Assignees
Labels

Comments

@itsthisjustin
Copy link

As seen here: #54 (comment)

I'm getting the same issue. Even the sample projects present this problem on all mobile browsers. I see on Firefox, Chrome (with flags for webvr set) and oddly enough on the Firefox nightly on Android tapping the headset icon just makes the experience full screen.

@cvan cvan added the bug label Feb 13, 2018
@cvan cvan added this to the Polished community release milestone Feb 13, 2018
@cvan
Copy link
Contributor

cvan commented Feb 13, 2018

Thanks for digging this up from the comment and filing an issue. I'm going to take a look at this.

@cvan cvan self-assigned this Feb 13, 2018
@cvan
Copy link
Contributor

cvan commented Feb 13, 2018

@itsthisjustin @caseyyee @delapuente: can you try checking out my branch in PR #132, and see it fixes things for you?

what are your steps to reproduce? just load https://mozilla.github.io/unity-webvr-export/ on one of your devices?

  • Firefox for Android (Note 8)
  • Chrome for Android (Note 8)
  • Safari (iPhone X)

correct me if I'm missing something.

@cvan
Copy link
Contributor

cvan commented Feb 13, 2018

Original source was commented in #54 (comment):

image

@itsthisjustin
Copy link
Author

5wvlu_ofecnvwmyj7mmebmzc91yylplg-xxrvdyjejhxixumm

On Firefox Stable the error still shows up in the console, however on both Chrome and Canary on Android, the experience doesn't crash anymore. It also now shows me the "VR Ready" icon which didn't previously show up.

@caseyyee
Copy link
Contributor

@itsthisjustin this is definetly an issue we need to fix (raf errors), but just as a note, mobile is unreliable at best and not officially supported. Mobile browsers and devices generally don't have the memory and power to run these experiences well unfortunately!

@itsthisjustin
Copy link
Author

itsthisjustin commented Feb 13, 2018

@caseyyee yeah I guess that's going to depend largely upon how WebGL and WebVR are "handled" moving forward. The main page of webvr touts Cardboard as it's baseline way to experience the technology.

So if this Unity asset doesn't officially support mobile, it might not be good to say it's an export to webVR then since WebVR officially DOES support mobile.

@itsthisjustin
Copy link
Author

itsthisjustin commented Feb 13, 2018

Update: iPhone X with Safari gives the Maximum Call Stack error
skype_picture 1

@caseyyee
Copy link
Contributor

@itsthisjustin It's not actually a limitation of WebGL or WebVR. Mobile devices unfortunately simply don't have the power or memory to run Unityplayer well.

@cvan
Copy link
Contributor

cvan commented Feb 27, 2018

@caseyyee how should we go about updating the webvr-polyfill to include this patch (or the changes within this patch)? immersive-web/cardboard-vr-display@6f6a0c1

we don't want to upgrade the webvr-polyfill (#113) because of the changes required (#125).

and the webvr-polyfill.min.js is obviously minified. (this is going to get gross, heh, brb…)

@caseyyee
Copy link
Contributor

caseyyee commented Feb 27, 2018

@cvan probably just need to wait till we get fps controls in first. I don't think we can do much otherwise we lose fallback controls. Makes sense to prioritize #125 so we can get this polyfill updated sooner rather than later.

@cvan
Copy link
Contributor

cvan commented Feb 28, 2018

@caseyyee see the PR I opened yesterday: https://github.com/mozilla/unity-webvr-export/pull/175/files

cvan added a commit that referenced this issue Mar 1, 2018
patch webvr-polyfill to include fix for rAF on mobile (fixes issue #127; relevant to issue #113)
@cvan
Copy link
Contributor

cvan commented Mar 1, 2018

this is fixed by PR #175. @itsthisjustin: could you please try the version on master and let us know if it resolves your issue? thank you!

@cvan cvan closed this as completed Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants