exokitxr / exokit-web

Exokit WebXR engine for the browser
70 stars 18 forks source link

Browser testing #27

Closed avaer closed 5 years ago

avaer commented 5 years ago

Added all requirements for:

Will also need:

We should also note the requirements and flag setup for the above in the docs.

chrislatorres commented 5 years ago

Firefox flag requirement:

Enable javascript.options.shared_memory through about:config

avaer commented 5 years ago

☝️ That should probably go on the docs pages. I'll open an issue over in that repo.

chrislatorres commented 5 years ago

None of the Firefox browsers support webxr yet, but that work is in progress: https://bugzilla.mozilla.org/show_bug.cgi?id=1419190

https://immersive-web.github.io/webxr-reference/webxr-device-api/compatibility.html

chrislatorres commented 5 years ago

Flags required for Chrome WebXR entry: https://github.com/exokitxr/exokit-web-docs/issues/4#issuecomment-529046600

image

chrislatorres commented 5 years ago

Noted the device testing left to put into docs here: https://github.com/exokitxr/exokit-web-docs/issues/4

Updated OP.

avaer commented 5 years ago

I don't know about MacOS VR; I'm not set up for that and I've never seen it work.

MacOS does work in desktop mode though.

chrislatorres commented 5 years ago

Works on Firefox Reality with Oculus Quest

avaer commented 5 years ago

MacOS Safari error:

[Warning] No DPDB device match. (webxr-polyfill.module.js, line 3815)
[Error] Failed to recalculate device parameters.
    recalculateDeviceParams_ (webxr-polyfill.module.js:3767)
    Dpdb (webxr-polyfill.module.js:3738)
    CardboardVRDisplay (webxr-polyfill.module.js:5008)
    CardboardXRDevice (webxr-polyfill.module.js:6014)
    (anonymous function) (webxr-polyfill.module.js:6056)
    asyncFunctionResume
    (anonymous function)
    promiseReactionJob
[Warning] Using fallback Android device measurements. (webxr-polyfill.module.js, line 3551)
[Error] TypeError: function is not a constructor (evaluating 'super()')
    WorkerVm (WindowVm.js:29)
    _makeWindow (WindowVm.js:250)
    _onnavigate (xr-scene.js:37)
    attributeChangedCallback (xr-scene.js:122)
    setAttribute
    src (xr-scene.js:134)
    (anonymous function) (web.exokit.org:194)
    asyncFunctionResume
    promiseReactionJob
[Log] xr available (web.exokit.org, line 213)

Presumably this is the same error holding up iPhone.

avaer commented 5 years ago

The error is that new EventTarget is not classy in Safari, though it is classy everywhere else. We use it in inheritance.

avaer commented 5 years ago

https://github.com/mysticatea/event-target-shim

avaer commented 5 years ago

We can use that shim and test for /safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent), and overwrite window.EventTarget in that case.

avaer commented 5 years ago

I think all of the browsers work now 🎉.