CameraInfoModule

The `CameraInfoModule` class provides access to details about the device camera.

Example

// The following example demonstrates how to monitor the camera for a change in the recording state.

const Reactive = require('Reactive');
const Scene = require('Scene');
const CameraInfo = require('CameraInfo');

const hideUi = Reactive.or(CameraInfo.isRecordingVideo, CameraInfo.isCapturingPhoto);
const onScreenInstructions = Scene.root.find('canvas0');

// Binds the CameraInfo capture signals to the UI visibility signal with Reactive programming
onScreenInstructions.hidden = hideUi;

Properties

PropertyDescription

captureDevicePosition

(get) captureDevicePosition: CameraPosition (set) (Not Available)

Specifies a CameraPosition enum value identifying the current camera in use on the device.

effectSafeAreaInsets

(get) effectSafeAreaInsets: InsetsSignal (set) (Not Available)

Specifies an InsetsSignal indicating the insets of the effect safe area.

isCapturingPhoto

(get) isCapturingPhoto: BoolSignal (set) (Not Available)

Specifies a BoolSignal that indicates whether the camera is capturing a photo.

isRecordingVideo

(get) isRecordingVideo: BoolSignal (set) (Not Available)

Specifies a BoolSignal that indicates whether the camera is recording video.

previewSize

(get) previewSize: PixelSizeSignal (set) (Not Available)

Specifies a PixelSizeSignal describing the size of the preview, in pixels.

Methods

This class exposes no methods.

Enums

ValueDescription

CameraPosition

The CameraPosition enum describes the direction the camera is facing.