Skip to content

Engaging Masks

The "Engaging Masks" feature enhances the user experience by applying visual effects during the photo-taking process. It is managed through the effects attribute and can be enabled as shown below:

html
<hautai-liqa license="LICENSE_KEY" effects="true"></hautai-liqa>
<hautai-liqa license="LICENSE_KEY" effects="true"></hautai-liqa>
javascript
new Liqa({
  target: "#selector",
  license: "LICENSE_KEY",
  effects: true,
})
new Liqa({
  target: "#selector",
  license: "LICENSE_KEY",
  effects: true,
})

Differences

  • When enabled, the countdown before taking a photo (3-2-1) is disabled.
  • Effects:
    • First Effect: Activates when the face is detected and correctly positioned within the frame (center of the screen).
    • Second Effect: Activates when all validation requirements are met, and the app is ready to take a photo.

Affected APIs

  • Styles: The .live-video .countdown selector will be ignored.

Performance-Based Control

When effects are enabled, the LIQA app monitors device performance to manage the display of masks. If the device does not meet the required performance standards, masks will be disabled to ensure an optimal user experience.

  • If the device cannot maintain a frame rate above 20 FPS during video processing, engaging masks will be disabled.
  • For devices operating between 20 and 30 FPS, the video stream FPS will be synchronized with the frame processing time, resulting in a reduced video stream FPS.
  • Devices capable of processing video at rates exceeding 30 FPS will experience no changes, and the application will function as usual.
Performance control diagram