Skip to content

React 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 optional boundingBoxElement: HTMLElement

The bounding box element.


config

config: VitalSignEngineConfig

The config of the vital sign engine.


customConditionRange?

optional customConditionRange: CustomConditionRange

The customized condition checking range.


device?

optional device: string

The device ID of the camera.


faceDetectionRegion?

optional faceDetectionRegion: FaceDetectionRegion

The specific region of captured video for face detection.


faceDetectionSamplingInterval?

readonly optional faceDetectionSamplingInterval: number

The sampling interval of sampling the face detection result


faceDetectorType

readonly faceDetectorType: FaceDetectorType

The face detector type


faceMeshElement?

readonly optional faceMeshElement: HTMLElement

The face mesh element.


grabbedFrames?

readonly optional grabbedFrames: GrabbedFrame[]

The grabbed frames from the frame grabber.


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()?

optional onCameraDevicesUpdated: (event) => void

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

Parameters

event

CameraDevicesUpdatedEvent

Returns

void


onError()?

optional onError: (error) => void

The call back function that observers error.

Parameters

error

unknown

Returns

void


onInitialized()?

optional onInitialized: () => void

The call back function that observes the initialized event.

Returns

void


onPrecisionModeUpdated()?

optional onPrecisionModeUpdated: (event) => void

The call back function that observes the precision mode updated event.

Parameters

event

PrecisionModeUpdatedEvent

Returns

void


onPrecisionModeWillUpdate()?

optional onPrecisionModeWillUpdate: (event) => void

The call back function that observes the precision mode will update event. The function should call the response function with 'proceed' to proceed with the update, or 'wait' to wait.

Parameters

event

PrecisionModeWillUpdateEvent

Returns

void


onVideoFrameProcessed()?

optional onVideoFrameProcessed: (event) => void

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

Parameters

event

VideoFrameProcessedEvent

Returns

void


onVideoSettingsUpdated()?

optional onVideoSettingsUpdated: (event) => void

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

Parameters

event

VideoSettingsUpdatedEvent

Returns

void


precisionMode?

optional precisionMode: PrecisionMode

The precision mode of the camera.


presetFormat

presetFormat: PresetFormat

The camera resolution


sdkCredentials?

optional sdkCredentials: SdkCredentials

The SDK credentials for accessing the API.


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 optional videoSettings: VideoSettings

The video settings of the camera.


visualizationOptions?

optional 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>