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
// 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?
readonlyoptionalboundingBoxElement:HTMLElement
HTML element for the bounding box overlay.
config
config:
VitalSignEngineConfig
The configuration of the vital sign engine.
customConditionRange?
optionalcustomConditionRange:CustomConditionRange
Deprecated
Custom condition ranges.
device?
optionaldevice:string
The device ID of the currently selected camera.
faceDetectionRegion?
optionalfaceDetectionRegion:FaceDetectionRegion
Region used for face detection.
faceDetectionSamplingInterval?
readonlyoptionalfaceDetectionSamplingInterval:number
Sampling interval for face detection results.
faceDetectorType
readonlyfaceDetectorType:FaceDetectorType
Type of face detector being used.
faceMeshElement?
readonlyoptionalfaceMeshElement:HTMLElement
HTML element for the face mesh overlay.
grabbedFrames?
readonlyoptionalgrabbedFrames:GrabbedFrame[]
Frames grabbed by the frame grabber.
isActive
isActive:
boolean
Whether the camera is currently active.
maxFaceDetectionFps
readonlymaxFaceDetectionFps:number
Maximum frame rate for face detection.
maxFps
maxFps:
number
Maximum frame rate for processing.
onCameraDevicesUpdated()?
optionalonCameraDevicesUpdated: (event) =>void
Callback for camera devices updated events.
Parameters
event
Returns
void
onError()?
optionalonError: (error) =>void
Callback for error events.
Parameters
error
unknown
Returns
void
onInitialized()?
optionalonInitialized: () =>void
Callback for initialization completion.
Returns
void
onPrecisionModeUpdated()?
optionalonPrecisionModeUpdated: (event) =>void
Callback for precision mode updated events.
Parameters
event
Returns
void
onPrecisionModeWillUpdate()?
optionalonPrecisionModeWillUpdate: (event) =>void
Callback for precision mode will update events.
Parameters
event
Returns
void
onVideoFrameProcessed()?
optionalonVideoFrameProcessed: (event) =>void
Callback for video frame processed events.
Parameters
event
Returns
void
onVideoSettingsUpdated()?
optionalonVideoSettingsUpdated: (event) =>void
Callback for video settings updated events.
Parameters
event
Returns
void
precisionMode?
optionalprecisionMode:PrecisionMode
The current precision mode.
presetFormat
presetFormat:
PresetFormat
Current camera resolution preset.
realtimeEstimationConfig?
optionalrealtimeEstimationConfig:RealtimeEstimationConfig
Configuration for realtime estimation.
sdkCredentials?
optionalsdkCredentials:SdkCredentials
SDK credentials for API access.
transform
readonlytransform:TransformXStyle
Current X-transform style applied to the video.
userInfo
userInfo:
UserInfo
Information about the user being scanned.
version
readonlyversion:string
The version of the component.
videoSettings?
readonlyoptionalvideoSettings:VideoSettings
Current video settings.
visualizationOptions?
optionalvisualizationOptions: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>