Skip to content

TypeScript SDK Reference / VitalSignCameraCreationProps

Interface: VitalSignCameraCreationProps ​

Defines the properties for creating the vital sign camera component. This interface contains all the configuration options needed to initialize a VitalSignCamera instance.

Example ​

ts
const camera = createVitalSignCamera({
  isActive: true,
  userInfo: {
    age: 30,
    gender: Gender.Male,
    height: 175,
    weight: 70
  },
  config: {
    dataCollectionDuration: 30,
    serverId: ServerId.RemoteProd
  },
  onVideoFrameProcessed: (event) => {
    console.log('Frame processed:', event.scanConditions);
  }
});

Properties ​

ageEstimationConfig? ​

optional ageEstimationConfig: AgeEstimationConfig

Configuration for age estimation.


checkBrightness? ​

optional checkBrightness: boolean

Whether to check brightness conditions.


conditionCheckerConfig? ​

optional conditionCheckerConfig: ConditionCheckerConfig

Configuration for condition checking.


config? ​

optional config: VitalSignEngineConfig

Configuration for the vital sign engine.


customConditionRange? ​

optional customConditionRange: CustomConditionRange

Deprecated ​

Custom condition ranges. Use conditionCheckerConfig instead.


device? ​

optional device: string

Device ID of the camera to use.


disableAgeEstimation? ​

optional disableAgeEstimation: boolean

Whether age estimation is disabled.


enableBeautyAnalysis? ​

optional enableBeautyAnalysis: boolean

Whether beauty analysis is enabled.


enableRealtimeEstimation? ​

optional enableRealtimeEstimation: boolean

Enable realtime estimation with default settings.


faceApiModelPath? ​

optional faceApiModelPath: string

Path to Face API models.


faceDetectionModelLocation? ​

optional faceDetectionModelLocation: FaceDetectionModelLocation

Location of the face detection model.


faceDetectionRegion? ​

optional faceDetectionRegion: FaceDetectionRegion

Region of the frame to use for face detection.


faceDetectionSamplingInterval? ​

optional faceDetectionSamplingInterval: number

Interval for sampling face detection results in milliseconds.


faceDetectorType? ​

optional faceDetectorType: FaceDetectorType

Type of face detector to use.


frameGrabberConfig? ​

optional frameGrabberConfig: FrameGrabberConfig

Configuration for frame grabbing.


isActive ​

isActive: boolean

Whether the camera should be active immediately after creation.


maxFaceDetectionFps? ​

optional maxFaceDetectionFps: number

Maximum face detection frame rate.


maxFps? ​

optional maxFps: number

Maximum camera frame rate.


onCameraDevicesUpdated()? ​

optional onCameraDevicesUpdated: (event) => void

Callback for camera devices updated events.

Parameters ​

event ​

CameraDevicesUpdatedEvent

Returns ​

void


onError()? ​

optional onError: (error) => void

Callback for error events.

Parameters ​

error ​

unknown

Returns ​

void


onInitialized()? ​

optional onInitialized: () => void

Callback for initialization completion.

Returns ​

void


onModelLoadingProgress()? ​

optional onModelLoadingProgress: (progress) => void

Callback for model loading progress events.

Parameters ​

progress ​

ModelLoadingProgressEvent

Returns ​

void


onPrecisionModeUpdated()? ​

optional onPrecisionModeUpdated: (event) => void

Callback for precision mode updated events.

Parameters ​

event ​

PrecisionModeUpdatedEvent

Returns ​

void


onPrecisionModeWillUpdate()? ​

optional onPrecisionModeWillUpdate: (event) => void

Callback for precision mode will update events.

Parameters ​

event ​

PrecisionModeWillUpdateEvent

Returns ​

void


onTransformUpdated()? ​

optional onTransformUpdated: (transform) => void

Callback for transform updated events.

Parameters ​

transform ​

TransformXStyle

Returns ​

void


onVideoFrameProcessed()? ​

optional onVideoFrameProcessed: (event) => void

Callback for video frame processed events.

Parameters ​

event ​

VideoFrameProcessedEvent

Returns ​

void


onVideoSettingsUpdated()? ​

optional onVideoSettingsUpdated: (event) => void

Callback for video settings updated events.

Parameters ​

event ​

VideoSettingsUpdatedEvent

Returns ​

void


precisionMode? ​

optional precisionMode: PrecisionMode

Precision mode for scanning. If not set, falls back to legacy mode using V1 server. If set, uses V2 server.


preferredCamera? ​

optional preferredCamera: string

Preferred camera device ID.


presetFormat? ​

optional presetFormat: PresetFormat

Preset camera resolution format.


realtimeEstimationConfig? ​

optional realtimeEstimationConfig: RealtimeEstimationConfig

Configuration for realtime estimation.


sdkCredentials? ​

optional sdkCredentials: SdkCredentials

Credentials for accessing the backend API.


userInfo ​

userInfo: UserInfo

Information about the user being scanned.


visualizationOptions? ​

optional visualizationOptions: VisualizationOptions

Options for visual overlays like bounding boxes or face mesh.