I think this may be related to the browser security mentioned in the documentation for Barcode Scanner for local development.
“For security reasons, certain browsers will only allow access to an end-user device’s camera over an HTTPS connection and not a default HTTP connection. Since this widget accesses the end-user device’s camera through this method, the same constraints apply for using this widget in both production and local development. For production, an appropriate security setting can be applied when deploying to the Mendix Cloud. For local development, the easiest solution is to set up a local proxy that secures the connection towards your local Mendix application.”
It looks like you need to setup a local https proxy to be able to test this.