CameraFactory
interface CameraFactory extends HybridObjectThe CameraFactory allows creating various other
Camera related objects with arguments.
Properties
cameraPermissionStatus
readonly cameraPermissionStatus: PermissionStatusGet the current Camera PermissionStatus.
microphonePermissionStatus
readonly microphonePermissionStatus: PermissionStatusGet the current Microphone PermissionStatus.
supportsMultiCamSessions
readonly supportsMultiCamSessions: booleanGets 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.
- If
enableMultiCamistrue, theCameraSessionsupports attaching multipleCameraDevices as inputs/connections at the same time. - If
enableMultiCamisfalse, theCameraSessiononly supports a singleCameraDeviceinput at a time.
Throws
If enableMultiCam is true, but supportsMultiCamSessions is false.
createDepthFrameOutput()
createDepthFrameOutput(options: DepthFrameOutputOptions): CameraDepthFrameOutputCreate a new CameraDepthFrameOutput
with the given DepthFrameOutputOptions.
createDeviceFactory()
createDeviceFactory(): Promise<CameraDeviceFactory>Asynchronously create a new CameraDeviceFactory.
createFrameOutput()
createFrameOutput(options: FrameOutputOptions): CameraFrameOutputCreate a new CameraFrameOutput
with the given FrameOutputOptions.
createFrameRenderer()
createFrameRenderer(): FrameRendererCreate a new FrameRenderer.
createNormalizedMeteringPoint()
createNormalizedMeteringPoint(
x: number,
y: number,
size?: number): MeteringPointCreates 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()
createObjectOutput(options: ObjectOutputOptions): CameraObjectOutputCreate a new CameraObjectOutput
with the given ObjectOutputOptions.
createOrientationManager()
createOrientationManager(orientationSource: OrientationSource): OrientationManagerCreates a new OrientationManager.
createOutputSynchronizer()
createOutputSynchronizer(outputs: CameraOutput[]): CameraOutputSynchronizerCreate a new CameraOutputSynchronizer that
synchronizes the given outputs.
createPhotoOutput()
createPhotoOutput(options: PhotoOutputOptions): CameraPhotoOutputCreate a new CameraPhotoOutput
with the given PhotoOutputOptions.
createPreviewOutput()
createPreviewOutput(): CameraPreviewOutputCreate a new CameraPreviewOutput.
createTapToFocusGestureController()
createTapToFocusGestureController(): TapToFocusGestureControllerCreates a new TapToFocusGestureController.
createVideoOutput()
createVideoOutput(options: VideoOutputOptions): CameraVideoOutputCreate a new CameraVideoOutput
with the given VideoOutputOptions.
createZoomGestureController()
createZoomGestureController(): ZoomGestureControllerCreates 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.