Is it possible to use a wide-angle camera on a device?

Is it possible to access the device’s camera and launch 8thwall using a wide-angle camera?
I’m referring to the physical camera on the device, not adjusting the field of view (FOV) of the virtual camera in three.js.

I suspect this might be more of a limitation on the web browser rather than 8thwall itself, but I came across the following article:
Camera pan, tilt, and zoom

If there is a way to access navigator.mediaDevices.getUserMedia in 8thwall, I’d appreciate any guidance.

Hi!

Great question! While switching specifically to the wide-angle camera isn’t built into our XR8 engine, I’ve forwarded your request to our engineering team for consideration.

You can definitely use getUserMedia since 8th Wall experiences are client-side web pages at their core. However, you might find better results with something like a CameraPipelineModule:

I haven’t tested this approach myself, so I can’t guarantee it’s the best solution, but it seems like a good direction to explore until this feature is added to the engine.

Thank you for your response!
After testing various approaches, I was able to achieve it with the code below.

    XR8.addCameraPipelineModule({
      name: 'camerastartupmodule',
      onAttach: ({ stream }) => {
        const [videoTrack] = stream.getVideoTracks();
        const capabilities = videoTrack.getCapabilities();
        capabilities.zoom &&
          videoTrack.applyConstraints({
            advanced: [{ zoom: 0.5 }]
          });
      }
    });

While testing is still ongoing, the SLAM seems to be working accurately so far.
That said, it would be great if this could be easily configured within 8thwall!

1 Like

Awesome! I’ll forward this to our engineering team. :slight_smile:

1 Like

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.