Using CreateFromWebCam in BabylonReactNative

Hello!

First off, I’m having a great time with Babylon React Native, I am working on making a QR code scanner for in AR. So you can attach virtual objects to QR codes. I have a pretty solid proof of concept that I’ve made a while ago when getting images from the camera itself wasn’t available. So I used screenshots instead, this is not ideal since once you put a virtual object on top of it, the QR code becomes obstructed.
I noticed that I should be able to get an image from the camera through CreateFromWebCam (Native Camera by CedricGuillemet · Pull Request #614 · BabylonJS/BabylonNative · GitHub)
I’ve tried this with these versions:

    "@babylonjs/core": "5.0.0-alpha.65",
    "@babylonjs/react-native": "0.4.0-alpha.46",

But I get ERROR BJS - [15:47:41]: undefined
So I was wondering from what version of Babylon React Native I can use CreateFromWebCam and if it’s possible to use this while also being in AR mode.

Thanks!

Hey there! Tagging our Native king, @bghgary :smiley:

1 Like

@Cedric?

1 Like

Hi @HedwigAR

Webcam plugin is initialized in BbylonNative by default but it’s not in BabylonReactNative.
Any objection @ryantrem to intialize webcam in BRN?

1 Like

If the WebCam plugin is fully functional then adding it to BRN sounds good to me.

2 Likes

I’ll check it works and will do a PR in BRN.

1 Like

That’s great news! Thank you all! :smiley:

1 Like