Hello,
we are developing a mobile application using Maximo Application Framework (MAF) and we need to force the default camera to be the rear-facing (back) camera when opening the barcode scanner.
Currently, the scanner defaults to the front-facing (selfie) camera, even though our devices have multiple rear-facing cameras available (e.g., camera2 0
, camera2 2
, etc.).
We have attempted to override navigator.mediaDevices.getUserMedia
in AppCustomizations.js
, but this has no effect on the camera selection in the mobile app.
Can you confirm whether it is possible to set the default camera (e.g., via deviceId
or facing
) in the barcode-scanner component?
If yes, what would be the correct approach to pass this configuration in MAF? Ideally, we are looking for a way to prioritize facing="environment"
or target a specific camera device ID.
Thank you in advance!
Kind regards
------------------------------
Vojtěch Šustek
------------------------------