CameraPhotoOutput

interface CameraPhotoOutput extends CameraOutput

The CameraPhotoOutput allows capturing Photos in-memory. Photos can be saved to a file (or the media gallery) later on.

See

Example

const photoOutput = usePhotoOutput({})

Properties

mediaType

readonly mediaType: MediaType

The media type of the content being streamed by this CameraOutput.

Inherited from

CameraOutput.mediaType


outputOrientation

outputOrientation: Orientation

Gets or sets the output orientation of this CameraOutput.

Individual implementations of CameraOutput may choose different strategies for implementing output orientation, for example:

  • A Photo output might apply orientation via EXIF flags.
  • A Video output might apply orientation via track transform metadata.
  • A Preview output might apply orientation via view transforms.
  • A Frame output might not apply orientation and only pass it as a property via the Frame object, unless explicitly configured to physically rotate buffers.

Inherited from

CameraOutput.outputOrientation


outputType

readonly outputType: CameraOutputType

The type of the CameraOutput.

Inherited from

CameraOutput.outputType


supportsCameraCalibrationDataDelivery

readonly supportsCameraCalibrationDataDelivery: boolean

get whether this CameraPhotoOutput supports delivering camera calibration data, e.g. for reconstructing lens-distortion or geometry.

See

CapturePhotoSettings.enableCameraCalibrationDataDelivery


supportsDepthDataDelivery

readonly supportsDepthDataDelivery: boolean

Get whether this CameraPhotoOutput supports capturing depth data alongside with a normal Photo, e.g. for portrait effects matte.

See

CapturePhotoSettings.enableDepthData

Methods

capturePhoto()

capturePhoto(settings: CapturePhotoSettings, callbacks: CapturePhotoCallbacks): Promise<Photo>

Captures a Photo using the given CapturePhotoSettings.

Example

const photo = await photoOutput.capturePhoto(
  { flashMode: 'on' },
  {}
)