Skip to content

JavaScript SDK 1.1.2

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

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

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

IMPORTANT

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

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-1.1.2.tgz".

What's new

1.1.2 (27-Nov-2023)

  • Fixed the camera switching problem on iPad.

1.1.1 (24-Nov-2023)

  • Fixed the problem that switching camera is not working.

1.1.0 (31-Oct-2023)

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

    typescript
    /* 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.