Figment
Search…
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:
1
<script src="https://app.tryfigment.com/?key=<key>&ver=1.0.4"></script>
Copied!
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:
1
// Check if Figment is loaded successfully
2
window.addEventListener("FigmentLoaded", () => {
3
4
let inputVideoTrack = await getVideoTrack()
5
6
let figment = new FigmentApp({customerKey: key})
7
let outputVideoTrack = await figment.activate(
8
{
9
activeApp: "VB",
10
background: {
11
type: "blur",
12
blurStrength: "balanced",
13
},
14
inputFrequency: 1000 / 30, // set Figment's video input to 30 FPS
15
vbQuality: "quality",
16
inputMediaStream: {
17
videoTrack: inputVideoTrack
18
}
19
}
20
);
21
22
});
Copied!
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 modified 2mo ago