React SDK Reference / VitalSignCamera
Function: VitalSignCamera()
VitalSignCamera(
props):Element
React component for performing vital sign scanning using computer vision and AI.
This component provides a React-friendly interface for capturing and analyzing vital signs such as heart rate, blood pressure, respiratory rate, and other health metrics from video streams. It integrates with the PanopticAI Vital Sign Camera SDK to provide real-time health analysis through facial video analysis.
The component automatically handles camera access, face detection, condition checking, and health result computation. It emits events for real-time monitoring of the scanning process and provides an instance object for programmatic control.
Parameters
props
The component props
Returns
Element
A React element containing a video element for camera display
Example
import { VitalSignCamera } from 'react-vital-sign-camera'
function MyApp() {
const [camera, setCamera] = useState(null)
return (
<VitalSignCamera
isActive={true}
userInfo={{ age: 30, gender: 'male' }}
config={{ serverId: 'your-server-id' }}
onVideoFrameProcessed={(event) => {
console.log('Frame processed:', event)
}}
onCameraDevicesUpdated={(event) => {
console.log('Devices updated:', event)
}}
onCreated={(instance) => {
setCamera(instance)
}}
onError={(error) => {
console.error('Camera error:', error)
}}
/>
)
}