CameraFactory

interface CameraFactory extends HybridObject

The CameraFactory allows creating various other Camera related objects with arguments.

Properties

cameraPermissionStatus

readonly cameraPermissionStatus: PermissionStatus

Get the current Camera PermissionStatus.


microphonePermissionStatus

readonly microphonePermissionStatus: PermissionStatus

Get the current Microphone PermissionStatus.


supportsMultiCamSessions

readonly supportsMultiCamSessions: boolean

Gets whether the platform supports creating multi-cam CameraSessions.

Older phones may not be able to support this.

See

createCameraSession(enableMultiCam)

Methods

createCameraSession()

createCameraSession(enableMultiCam: boolean): Promise<CameraSession>

Creates a new CameraSession.

Throws

If enableMultiCam is true, but supportsMultiCamSessions is false.


createDepthFrameOutput()

createDepthFrameOutput(options: DepthFrameOutputOptions): CameraDepthFrameOutput

Create a new CameraDepthFrameOutput with the given DepthFrameOutputOptions.


createDeviceFactory()

createDeviceFactory(): Promise<CameraDeviceFactory>

Asynchronously create a new CameraDeviceFactory.


createFrameOutput()

createFrameOutput(options: FrameOutputOptions): CameraFrameOutput

Create a new CameraFrameOutput with the given FrameOutputOptions.


createFrameRenderer()

createFrameRenderer(): FrameRenderer

Create a new FrameRenderer.


createNormalizedMeteringPoint()

createNormalizedMeteringPoint(
   x: number, 
   y: number, 
   size?: number): MeteringPoint

Creates a normalized MeteringPoint, where x and y are values in the normalized range from 0.0 to 1.0.

Your are responsible for handling orientation, cropping and scaling.

Parameters

x

The X coordinate ranging from 0.0 to 1.0

y

The Y coordinate ranging from 0.0 to 1.0

size

The size/radius of the MeteringPoint


createObjectOutput()

iOS
createObjectOutput(options: ObjectOutputOptions): CameraObjectOutput

Create a new CameraObjectOutput with the given ObjectOutputOptions.


createOrientationManager()

createOrientationManager(orientationSource: OrientationSource): OrientationManager

Creates a new OrientationManager.


createOutputSynchronizer()

iOS
createOutputSynchronizer(outputs: CameraOutput[]): CameraOutputSynchronizer

Create a new CameraOutputSynchronizer that synchronizes the given outputs.


createPhotoOutput()

createPhotoOutput(options: PhotoOutputOptions): CameraPhotoOutput

Create a new CameraPhotoOutput with the given PhotoOutputOptions.


createPreviewOutput()

createPreviewOutput(): CameraPreviewOutput

Create a new CameraPreviewOutput.


createTapToFocusGestureController()

createTapToFocusGestureController(): TapToFocusGestureController

Creates a new TapToFocusGestureController.


createVideoOutput()

createVideoOutput(options: VideoOutputOptions): CameraVideoOutput

Create a new CameraVideoOutput with the given VideoOutputOptions.


createZoomGestureController()

createZoomGestureController(): ZoomGestureController

Creates a new ZoomGestureController.


requestCameraPermission()

requestCameraPermission(): Promise<boolean>

Request Camera permission.

Returns

true if Camera permission has now been granted, false otherwise.


requestMicrophonePermission()

requestMicrophonePermission(): Promise<boolean>

Request Microphone permission.

Returns

true if Microphone permission has now been granted, false otherwise.