Access depth camera from web?

I'm writing a WebXR experience for the Magic Leap 2. I'm able to get regular color pixels via WebRTC. Now I'd like to be able to access the depth camera as well. It doesn't appear to be exposed via WebRTC. Is there some other way I can access it using web technology? Thank you!

@iangilman Unfortunately we do not support accessing depth data in WebXR at this time. If you provide additional information on the impact of not having access to the depth camera via the WebXR APIs , I can forward your request to our voice of customer team.

Thank you for the confirmation!

I'm researching the possibility of using WebXR on the ML2 to make an app for mapping out a space as the user walks around and looks at things. We can make some progress using CV on the regular video feed, but having the depth feed would give us more accuracy.

In addition to that, we would love to be able to scan markers to register our map to the real-world location. My understanding is marker scanning is also not exposed via WebXR.

I believe those features are all available via the native SDK and Unity, so we may need to switch technologies, but we'd love to be able to do as much as we can with WebXR!

1 Like

Thank you for that information. You are correct, these features are currently unavailable when using WebXR on Magic Leap 2. I have forwarded this request to our voice of customer team.

1 Like