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.

Properties

boundingBoxElement?

readonly boundingBoxElement?: HTMLElement

The bounding box element.


config

config: VitalSignEngineConfig

The config of the vital sign engine.


customConditionRange?

customConditionRange?: CustomConditionRange

The customized condition checking range.


device?

device?: string

The device ID of the camera.


faceDetectionRegion?

faceDetectionRegion?: FaceDetectionRegion

The specific region of captured video for face detection.


faceDetectionSamplingInterval?

readonly faceDetectionSamplingInterval?: number

The sampling interval of sampling the face detection result


faceDetectorType

readonly faceDetectorType: FaceDetectorType

The face detector type


faceMeshElement?

readonly faceMeshElement?: HTMLElement

The face mesh element.


isActive

isActive: boolean

True if the camera is activated.


maxFaceDetectionFps

readonly maxFaceDetectionFps: number

The maximum frame rate of the face detection. Default is 5.


maxFps

maxFps: number

The maximum frame rate of the frame processing rate. Default is 30.


onCameraDevicesUpdated?

onCameraDevicesUpdated?: (event) => void

The call back function that observes the camera devices updated event.

Parameters

event: CameraDevicesUpdatedEvent

Returns

void


onError?

onError?: (error) => void

The call back function that observers error.

Parameters

error: unknown

Returns

void


onInitialized?

onInitialized?: () => void

The call back function that observes the initialized event.

Returns

void


onVideoFrameProcessed?

onVideoFrameProcessed?: (event) => void

The call back function that observes the video frame processed event.

Parameters

event: VideoFrameProcessedEvent

Returns

void


onVideoSettingsUpdated?

onVideoSettingsUpdated?: (event) => void

The call back function that observes the video settings updated event.

Parameters

event: VideoSettingsUpdatedEvent

Returns

void


presetFormat

presetFormat: PresetFormat

The camera resolution


transform

readonly transform: TransformXStyle

The x-transform style of the camera.


userInfo

userInfo: UserInfo

The info of the user doing the scan.


version

readonly version: string

The version of the component.


videoSettings?

readonly videoSettings?: VideoSettings

The video settings of the camera.


visualizationOptions?

visualizationOptions?: VisualizationOptions

The visualization options of the camera.

Methods

bind()

bind(video): void

Call this method to bind the video html element to the vital sign camera comoponent.

Parameters

video: HTMLVideoElement

Returns

void


startScanning()

startScanning(): void

Call this method to start scanning.

Returns

void


stopScanning()

stopScanning(): void

Call this method to abort scanning.

Returns

void


waitCameraToStop()

waitCameraToStop(timeoutMS?): Promise<boolean>

Call this method to wait until the camera is stopped completely.

Parameters

timeoutMS?: number

Returns

Promise<boolean>