Welcome to the interactive playground! This tool demonstrates how to perform a web-based measurement using a webcam.

This playground provides a hands-on way to explore how Anura Web Core SDK works. For demonstration purposes, it retrieves values from License and Study ID and uses the built-in window.getToken() function to make a REST call to the Register License endpoint. This function registers the provided license key and returns the necessary authentication details, including token, refreshToken, and studyId, which are required to prepare the measurement.

Important: When using this library in production, you should never include License and Study ID in frontend code. Instead, store them securely on your backend and have your frontend communicate with the backend to retrieve the necessary authentication details.

  • Interactive code editor with an execution environment
  • Console emulator for real-time logging
  • Buttons to open the camera and start a measurement

Follow these steps to make a measurement using a webcam:

  1. Enter a valid License and Study ID.
  2. Click the "Run Code" button to initialize the measurement module.
  3. Once the face tracker is loaded, the "Open" button will be enabled. Select a webcam from the drop-down and click Open button to open the camera.
  4. When the face tracker is ready, the "Start Measurement" button will be enabled. Click on it to begin the measurement.
  5. The results will be displayed in the console emulator.
  6. You should receive a total of six results in the console, approximately every five secondsfive intermediate results followed by one final result.