Skip to content

JavaScript SDK 1.1.2

Sample Code

The easiest and fastest way to get started with the SDK is to download and try the sample code. We provide full featured samples for different frameworks and platforms for developer to start with:


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.


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

npm install ""
yarn add ""


Please use Webpack as the bundler for your production code. Other web bundling tool such as Vite is not supported yet.

What's new


  • Fixed the camera switching problem on iPad.


  • Fixed the problem that switching camera is not working.


  • Support Blink Detection. To enable it, set the faceDetectorType to TFMediaPipe and set the maxFaceDetectionFps to at least 15. For example:

    /* Create and init Vital Sign Camera */
    const cam = createVitalSignCamera({ 
      isActive: true, config, userInfo, 
      faceDetectorType: FaceDetectorType.TFMediaPipe, 
      maxFaceDetectionFps: 15
  • Removed FPS debug log.

  • Fixed the problem that a extra instance of VitalSignEngine is created, causing a 403 forbidden error.