Skip to main content

Front-facing camera

By default, BlinkID will try to use the rear-facing camera of the device. However, you can configure it to use the front-facing camera instead. This is useful for kiosk-style applications where a tablet or similar device is mounted, and the user is expected to scan their document by holding it up to the screen.

note

This option is not supported when using the all-in-one blinkid package. Use the camera-manager package and modify the rest of your application logic accordingly.

When starting a video stream, pass the preferredFacing parameter to startCameraStream():

import { CameraManager } from "@microblink/camera-manager";

const cameraManager = new CameraManager();
await cameraManager.startCameraStream({
preferredFacing: "front",
});

See also the camera selection example app.