[webkit-dev] WebXR on WebKit

Sergio Villar Senin svillar at igalia.com
Fri Mar 6 03:56:59 PST 2020


Hi,

I've just uploaded a patch[1] (based on previous work from my colleague
Žan Doberšek) which brings a very basic WebXR[2] support for WebKit.
Right now is just IDLs, stubs and pretty basic platform code, mostly
empty implementations anyway.

You can see WebXR[3] as the evolution of the deprecated WebVR API
(which I recently removed from the tree). The idea is bringing the
experience of mixed reality worlds (from VR to AR) to the Web by using
the appropriate devices.

This new spec was not born in a semi-deprecated state as WebVR did.
It's currently partially shipped in Chrome/Edge[4]. Firefox has not
shipped it yet but Mozilla has been one of the original authors of the
specs with some proposals dating back to 2017. There is ongoing work to
support the spec[5].

It's worth mentioning that there are already several WPT tests[6] for
the feature (my plan is to import them ASAP and make them work as APIs
are implemented).

Another important difference from the WebVR era is that right now we
have a multiplatform Khronos standarized API for accessing VR/AR
devices and platforms called OpenXR[7]. My plan is to implement all the
platform code using OpenXR as a reference. This would allow us to use
even the same platform code for different ports. AFAIK there is no
OpenXR implementation and loader available at the moment for MacOS/iOS
but I guess it'll eventually happen (in any case the platform code
could be implemented without using OpenXR of course).

Privacy has been always a concern in the WebKit project and now it
gained the status of project goal. That's why I'd also like to mention
here that privacy&security was also considered[8] since the very
beginning. For example, when I attended the TPAC F2F meeting of the
WebXR WG there was a joint session with the privacy CG where
fingerprinting and other potential threat vectors were discussed.

Last but not least, I'll focus this early stages of development in the
WPE port, meaning that for example I'll be maintaining just the WPE
build configuration (other ports won't be affected). My plan is to
extend the support to other ports as the implementation matures.

Opinions?

BR

[1] https://bugs.webkit.org/show_bug.cgi?id=208702
[2] https://immersive-web.github.io/webxr/
[3] https://github.com/immersive-web/webxr/blob/master/explainer.md
[4] https://caniuse.com/#search=webxr
[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1614496
[6] 
https://wpt.fyi/results/webxr?label=experimental&label=master&aligned
[7] https://www.khronos.org/openxr/
[8] https://github.com/immersive-web/privacy-and-security



More information about the webkit-dev mailing list