CameraConnectionConfiguration

interface CameraConnectionConfiguration

Specifies options for a CameraSessionConnection in CameraSession.configure(...).

Like a diff-map, setting a value inside the CameraConnectionConfiguration object to undefined, causes the prop to be left at whatever its current value is.

Properties

cameraExtension?

optional cameraExtension: CameraExtension

Enables the given CameraExtension for this CameraDevice.

Throws

If enableVideoHDR is enabled.

Throws

If the given extension is not supported.


depthFormat?

optional depthFormat: DepthFormatOrNull

The CameraFormat to use for the depth configuration, or null to not enable a depth format.

This drives depth resolution for a DethOutput, and must be one of the available depthDataFormats on the currently selected format.

Throws

If the given CameraFormat is not a depth-format on the currently selected CameraFormat (see CameraFormat.depthDataFormats)

Default

null

enableVideoHDR?

optional enableVideoHDR: boolean

Sets whether to enable HDR (high dynamic range) for the video stream of the Camera Session.

This typically affects all video outputs such as Video Capture, Frame Outputs and Preview.

Note

Video HDR can only be enabled if the given format supports Video HDR (see CameraFormat.supportsVideoHDR)

Note

Video HDR can only be enabled if no cameraExtension is set.

Default

false

format?

optional format: CameraFormat

The CameraFormat to use for the session configuration.

This drives video resolution (CameraFormat.videoResolution), photo resolution (CameraFormat.photoResolution), supported FPS ranges (CameraFormat.supportedFpsRanges), supported color-spaces, video HDR, and more.

Throws

If the given CameraFormat is not a format on the given CameraDevice input.

Throws

If the given CameraFormat does not support multi-cam sessions (see CameraFormat.supportsMultiCam), but the CameraSession is a multi-cam session.

Default

auto

fps?

optional fps: Range

The target FPS (frames per second) for the Camera.

  • If set to a dynamic range (Range.min < Range.max), the Camera may throttle its FPS in low-light conditions to allow for more exposure and better quality, at the cost of lost "smoothness".
  • If set to a fixed range (Range.min == Range.max), the Camera will run at the given Frame Rate as normal.

The given Range must be a valid supported range from the given format's supportedFpsRanges.

Default

[30, 30]

initialExposureBias?

optional initialExposureBias: number

Sets the initial exposureBias value for the CameraController.

This value can later be adjusted via CameraController.setExposureBias(...).


initialZoom?

optional initialZoom: number

Sets the initial zoom value for the CameraController.

This value can later be adjusted via CameraController.setZoom(...).


videoStabilizationMode?

optional videoStabilizationMode: VideoStabilizationMode

Sets the VideoStabilizationMode for the Camera pipeline.

Video Stabilization can only be set to a VideoStabilizationMode supported by the currently selected format (see CameraFormat.supportsVideoStabilizationMode(...)).