Integrate Figment

All about integrating Figment, quickstart and whitelisting domains.

Integrate Figment

Figment can be integrated to your Website by simply adding a <script> tag to the body of the HTML:

<script src="https://app.tryfigment.com/?key=<key>&ver=1.0.4"></script>

The <key> placeholder must be replaced with the customer key we provide.

Quickstart

Working with Figment is simple. After including the <script> tag, the class FigmentApp lives in the window namespace of the browser. Below we describe a minimal example for using Figment:

// Check if Figment is loaded successfully
window.addEventListener("FigmentLoaded", () => {

  let inputVideoTrack = await getVideoTrack()
  
  let figment = new FigmentApp({customerKey: key})
  let outputVideoTrack = await figment.activate(
    {
      activeApp: "VB",
      background: {
        type: "blur",
        blurStrength: "balanced",
      },
      inputFrequency: 1000 / 30, // set Figment's video input to 30 FPS
      vbQuality: "quality",
      inputMediaStream: {
        videoTrack: inputVideoTrack
      }
    }
  );

});

More details about how to interface with Figment are provided on the next page.

Whitelisting Domains

For security reasons we need to whitelist the core domains that will be used for both testing and production. Once the core domain example.example.com is whitelisted and added to our Database under your customer key, all sub domains that follow the core format will be automatically whitelisted as well.

Last updated