CameraProps

interface CameraProps

Extended by

Properties

constraints?

optional constraints: Constraint[]

Constraints (e.g. { fps: 60 }) that the Camera pipeline will try to match when configuring the CameraSession.

See

CameraSessionConnection.constraints


device

The CameraDevice to open, or a CameraPosition (e.g. 'back') to auto-pick a matching device via getCameraDevice(...).

See

CameraSessionConnection.input


enableDistortionCorrection?

iOS
optional enableDistortionCorrection: boolean

If true, geometric distortion at the edges (e.g. on ultra-wide-angle cameras) is corrected, at the cost of a small amount of field of view.

See

CameraControllerConfiguration.enableDistortionCorrection

Default

true

enableLowLightBoost?

optional enableLowLightBoost: boolean

If true, the Camera pipeline may extend exposure times (effectively dropping frame rate) in low-light scenes to receive more light.

See

CameraControllerConfiguration.enableLowLightBoost

Default

false

enableSmoothAutoFocus?

iOS
optional enableSmoothAutoFocus: boolean

If true, auto-focus transitions are performed slower and smoother to appear less intrusive in video recordings.

See

CameraControllerConfiguration.enableSmoothAutoFocus

Default

false

getInitialExposureBias()?

optional getInitialExposureBias: () => number | undefined

A getter for the initial exposure bias to apply when the CameraController is created. Later, the exposure bias can be adjusted via CameraController.setExposureBias(...).

See

CameraSessionConnection.initialExposureBias


getInitialZoom()?

optional getInitialZoom: () => number | undefined

A getter for the initial zoom value to apply when the CameraController is created. Later, the zoom can be adjusted via CameraController.setZoom(...).

See

CameraSessionConnection.initialZoom


isActive

isActive: boolean

Starts the CameraSession when set to true, and stops it when set back to false.

See


mirrorMode?

optional mirrorMode: MirrorMode

Sets whether the CameraOutputs are mirrored along the vertical axis. 'auto' mirrors automatically on selfie cameras.

See

CameraOutputConfiguration.mirrorMode

Default

'auto'

onConfigured()?

optional onConfigured: () => void

Called whenever the CameraSession has been configured with new connections via configure(...) and connections to the individual outputs are formed.

This is a good place to check output capabilities, such as CameraVideoOutput.getSupportedVideoCodecs()


onError()?

optional onError: (error: Error) => void

Called whenever the CameraSession has encountered an error.

See

CameraSession.addOnErrorListener


onInterruptionEnded()?

optional onInterruptionEnded: () => void

Called when a previous interruption has ended and the CameraSession is running uninterrupted again.

See

CameraSession.addOnInterruptionEndedListener


onInterruptionStarted()?

optional onInterruptionStarted: (interruption: InterruptionReason) => void

Called whenever the CameraSession has encountered an interruption of the given InterruptionReason. Interruptions are temporarily.

See

CameraSession.addOnInterruptionStartedListener


onSessionConfigSelected()?

optional onSessionConfigSelected: (config: CameraSessionConfig) => void

Called once the given constraints have been fully resolved into a concrete CameraSessionConfig.

See

CameraSessionConnection.onSessionConfigSelected


onStarted()?

optional onStarted: () => void

Called when the CameraSession has been started.

See

CameraSession.addOnStartedListener


onStopped()?

optional onStopped: () => void

Called when the CameraSession has been stopped.

See

CameraSession.addOnStoppedListener


onSubjectAreaChanged()?

optional onSubjectAreaChanged: () => void

Called when the subject area substantially changes, e.g. when the user pans away from a scene that was previously in focus.

This is a good point to reset any locked AE/AF/AWB focus states back to continuously auto-focus.

See

CameraController.addSubjectAreaChangedListener


orientationSource?

optional orientationSource: OrientationSource | "custom"

Set a desired OrientationSource for automatically applying CameraOrientation to all outputs, or 'custom' if you prefer to manually specify CameraOrientation yourself.

See

CameraOutput.outputOrientation


outputs?

optional outputs: CameraOutput[]

The CameraOutputs the device will stream into.

See