Skip to content

TypeScript SDK Reference / VitalSignCameraInterface

Interface: VitalSignCameraInterface

Defines the Vital Sign Camera, the main component for doing vital sign scanning. This component is created by the function createVitalSignCamera and provides the primary interface for controlling camera-based vital sign measurement.

Example

ts
// Create and setup the camera
const camera = createVitalSignCamera({
  isActive: true,
  userInfo: userData,
  onVideoFrameProcessed: handleFrame
});

// Bind to video element
camera.bind(document.getElementById('video'));

// Start scanning
camera.startScanning();

Properties

boundingBoxElement?

readonly optional boundingBoxElement: HTMLElement

HTML element for the bounding box overlay.


config

config: VitalSignEngineConfig

The configuration of the vital sign engine.


customConditionRange?

optional customConditionRange: CustomConditionRange

Deprecated

Custom condition ranges.


device?

optional device: string

The device ID of the currently selected camera.


faceDetectionRegion?

optional faceDetectionRegion: FaceDetectionRegion

Region used for face detection.


faceDetectionSamplingInterval?

readonly optional faceDetectionSamplingInterval: number

Sampling interval for face detection results.


faceDetectorType

readonly faceDetectorType: FaceDetectorType

Type of face detector being used.


faceMeshElement?

readonly optional faceMeshElement: HTMLElement

HTML element for the face mesh overlay.


grabbedFrames?

readonly optional grabbedFrames: GrabbedFrame[]

Frames grabbed by the frame grabber.


isActive

isActive: boolean

Whether the camera is currently active.


maxFaceDetectionFps

readonly maxFaceDetectionFps: number

Maximum frame rate for face detection.


maxFps

maxFps: number

Maximum frame rate for processing.


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


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


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

The current precision mode.


presetFormat

presetFormat: PresetFormat

Current camera resolution preset.


realtimeEstimationConfig?

optional realtimeEstimationConfig: RealtimeEstimationConfig

Configuration for realtime estimation.


sdkCredentials?

optional sdkCredentials: SdkCredentials

SDK credentials for API access.


transform

readonly transform: TransformXStyle

Current X-transform style applied to the video.


userInfo

userInfo: UserInfo

Information about the user being scanned.


version

readonly version: string

The version of the component.


videoSettings?

readonly optional videoSettings: VideoSettings

Current video settings.


visualizationOptions?

optional visualizationOptions: VisualizationOptions

Visualization options for overlays.

Methods

bind()

bind(video): void

Bind the camera to an HTML video element.

Parameters

video

HTMLVideoElement

Returns

void


startScanning()

startScanning(): void

Start the vital sign scanning process.

Returns

void


stopScanning()

stopScanning(): void

Stop the scanning process.

Returns

void


waitCameraToStop()

waitCameraToStop(timeoutMS?): Promise<boolean>

Wait for the camera to stop completely.

Parameters

timeoutMS?

number

Returns

Promise<boolean>