Skip to content

JavaScript SDK 2.3.0 ​

Sample Code ​

The quickest and simplest way to kickstart your journey with the JavaScript SDK is by downloading and experimenting with our full-featured sample code:

IMPORTANT

In the above sample codes, the strings __YOUR_USER_ID__ and __YOUR_API_KEY__ should be replaced by your own User ID and API Key repectively. Please contact us to obtain your User ID and API Key.

Installation ​

SDK file installation ​

In your NodeJS project, install the SDK with the npm install or yarn add commands:

bash
npm install "https://sdk.panoptic.ai/npm/ts-vital-sign-camera-2.3.0.tgz"
bash
yarn add "https://sdk.panoptic.ai/npm/ts-vital-sign-camera-2.3.0.tgz"

TIP

If you are using Yarn v2 or later, you might need to include the package name in the command, such as yarn add vital-sign-camera@"https://sdk.panoptic.ai/npm/ts-vital-sign-camera-2.3.0.tgz".

Alternatively, if you are not using NodeJS, you can install the SDK by adding the following line to your main HTML file:

html
<script src="vital-sign-camera.umd-2.3.0.js">

The file vital-sign-camera.umd-2.3.0.js is included in this sample project.

Vite Configuration ​

If you are using Vite as your build tool, you need to exclude ts-vital-sign-camera from dependency optimization to ensure proper functionality:

javascript
// vite.config.js
export default defineConfig({
  optimizeDeps: {
    exclude: ['ts-vital-sign-camera'],
  },
});

Deployment Notes ​

NOTE

If the project is deployed to Google Cloud, some web servers, such as serve, might not function correctly, causing the facial skin age feature to fail. To prevent this issue, use http-server instead.

What's new ​

2.3.0 (09-Oct-2026) ​

  • Real-time estimation: enableRealtimeEstimation and realtimeEstimationConfig produce on-device HR/RR estimates during the scan, with estimatorType (Panoptic — default — or MeRppg), signalQualityDelay, minSamples, scanDuration, and visualSignalType. See the realtime estimators guide.
  • Scanning sequence visualization: visualizationOptions.scanningSequence orchestrates the face mesh, bounding box, and thermal mask through an animated scan sequence (horizontal → vertical → ripple sweeps, then a thermal step), with configurable sweepColor, sweepLineWidth, staticLineWidth, staticColor, stepDurations, animationDelay, and an idleStage configuration shown between scans.
  • Thermal mask: visualizationOptions.thermalMask adds a thermal-style overlay tracked to the face ROI, with opacity and colorScheme ('thermal' | 'grayscale').
  • Heatmap visualization: configurable heatmap rendering with built-in colormaps and presets.
  • Face mesh options: new 'ripple' animation direction and simplifyFaceMesh to remove the outer perimeter and surrounding zigzag connections.
  • Age estimation: added AgeEstimationConfig.timeout (default 15 s), plus reliability fixes (age inference in a Web Worker, FaceApi readiness handling).
  • Signal visualizer: respiratory-rate extraction, signalColors, variadic updateSignal, and confidence-based HR colors.
  • Breaking changes: RealtimeEstimatorType.Fda renamed to RealtimeEstimatorType.Panoptic; creation prop realtimeEstimation renamed to enableRealtimeEstimation; minDuration renamed to signalQualityDelay (with unused earlyEstimation/minConfidence fields removed from the realtime estimation config). See the V1 → V2 migration guide if you are upgrading from V1.

2.2.3 (13-May-2026) ​

  • Fixed scan timing (WEP-85) where the first frame could be dropped when elapsed time exceeded stage time; the initial send now always fires before the time guard.
  • Added endpointURL config option to RemoteHealthAnalyzerConfig for full V2 get-health endpoint URL override (including path).
  • No breaking API changes.

2.2.2 (29-Apr-2026) ​

  • Fixed ModelFetchInterceptor handling so non-model requests and post-stop fetch calls correctly passthrough without breaking V2 wake-up flows.
  • Improved stability for model loading, server wake-up requests, and shared fetch interception across web integrations.
  • No breaking API changes; this release focuses on production hardening after the 2.2.1 line.

2.2.1 (29-Apr-2026) ​

  • Precision mode now preserves caller overrides for serverId, including Schema2Dev, instead of forcing the production V2 server.
  • Improved V2 request/response handling by filtering wake-up traffic from last-request debugging helpers and clarifying V2 response APIs.
  • Added camera/video startup and restart stability fixes across real-camera and video-file scanning flows.

2.2.0 (12-Feb-2026) ​

  • Video file support: VitalSignCamera now supports VideoFile input with playback handling and frame-rate detection. Includes onFrameRateDetected callback and improved error handling for file-based workflows.
  • Persistence API: Added saveScanDataToS3 for optional uploading of request/response payloads to S3 (supports optional encryption).
  • Realtime & diagnostics: Added video information display (frame rate, resolution) and a remote console plugin for remote logging and diagnostics.
  • ROI & performance: ROI extraction refactor to support ImageBitmap for better performance and interop; improved video playback controls and consistent display styling.
  • Tests & CI: Expanded E2E fixtures and automated tests (example18/19), improved video-processing tests and CI verification.
  • Packaging & stability: WASM/asset packaging fixes and UMD/ES builds validated. No breaking API changes; upgrade recommended for improved stability and packaging.