Camera
A Camera view (the equivalent of VisionCamera's <Camera />): it creates a preview output, runs a session with it and the given outputs (see rememberCamera), and displays the preview.
Camera(
device = TargetCameraPosition.BACK,
isActive = true,
modifier = Modifier.fillMaxSize(),
)Parameters
The me.nathanfallet.visioncamera.CameraDevice to open, or a me.nathanfallet.visioncamera.TargetCameraPosition to use the default device at that position.
Starts the session when true, and stops it when false.
The Modifier of the preview.
Additional CameraOutputs, besides the preview.
Constraints the session tries to match, ranked by priority. Like VisionCamera's Camera, a ResolutionBiasConstraint for each output is added after them, with a lower priority.
Whether the outputs are mirrored. MirrorMode.AUTO mirrors selfie cameras.
The OrientationSource whose orientation is automatically applied to all outputs (see CameraOutput.outputOrientation), or null to set it yourself (VisionCamera's 'custom').
The zoom value, applied declaratively.
The exposure bias, applied declaratively.
The torch mode, applied declaratively.
Low-light boost, smooth auto-focus and distortion correction.
Session-wide configuration (iOS audio and haptics behavior).
How the Camera feed is scaled into the view's bounds.
Whether the preview uses a SurfaceView or a TextureView (Android only).
Called with the CameraController once the session is configured, e.g. to focus.
Called once the constraints have been resolved.
Called whenever the session has been configured.
Called when the session started.
Called when the session stopped.
Called when the session encountered an error.
Called when the session was interrupted.
Called when an interruption ended.
Called when the subject area substantially changes, e.g. when the user pans away from a scene previously in focus: a good point to reset locked focus. iOS only, like V5.
Called when the output orientation (driven by orientationSource) or the interface orientation changes, with the rotation in degrees (-90, 0, 90 or 180) that UI elements such as Camera controls need to appear upright.
Called when the preview started streaming.
Called when the preview stopped streaming.
Installs the native pinch-to-zoom gesture. zoom must then be null.
Installs the native tap-to-focus gesture.
A CameraRef exposing the controller and preview methods, see rememberCameraRef.