QR Code Scanner on Mobile Uses Front Camera by Default — How to Use Rear Camera?

I’m using the new QR Code scanner component in WeWeb, and it’s working well, but I noticed a problematic behavior on mobile devices.

When the user accesses the QR Code scanning feature, the front (selfie) camera is activated by default. In my case, this affects usability because the user needs to use the rear camera to properly scan a QR Code, ensuring better visibility and correct device positioning.

I’d like to know if there’s a way to force the use of the rear camera in the component.

I used custom code to use the second camera name when on mobile. I have a select dropdown shown on desktop and tablet where the user can choose a camera. that’s the “INP Camera Options” from the code.

the code is just:
if(breakpoint not mobile) use the selected camera from the dropdown
else(if mobile) use the second camera