Camera
actual fun Camera(modifier: Modifier, cameraSelection: CameraSelection, captureResolution: CameraCaptureResolution, showCameraPreview: Boolean, onFrameCaptured: suspend (frame: CameraFrame) -> Unit)
expect fun Camera(modifier: Modifier = Modifier, cameraSelection: CameraSelection = CameraSelection.DEFAULT_FRONT_CAMERA, captureResolution: CameraCaptureResolution, showCameraPreview: Boolean, onFrameCaptured: suspend (frame: CameraFrame) -> Unit)
Custom composable taking care of the camera operations initialization and camera preview composition.
This requires camera permission, see org.multipaz.compose.permissions.rememberCameraPermissionState.
Parameters
modifier
The composition modifier to apply to the composable.
cameraSelection
The desired hardware camera to use.
captureResolution
The desired resolution to use for the camera capture.
showCameraPreview
Whether to show the preview of the captured frame within the Camera composable.
onFrameCaptured
A callback to invoke when a frame is captured with the frame object. This is invoked on an I/O thread.