Skip to content

React SDK 2.0.1

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:

Download React 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 Vue or React project, install the SDK with the npm install or yarn add commands. Please note that different frameworks require different packages.

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

IMPORTANT

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

What's new

2.0.1

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

2.0.0

  • Rewritten based on new JavaScript SDK.
  • Added error handling to sample code.

1.4.2

  • Fixed the problem that ServerId is not exported.
  • Updated the Vital Sign Engine Plugin to 2.0.0 for performance optimization.