Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Results

Results provided by the Video Provider component.

The Video Provider component will record the user's interaction with the widgets it contains. You can retrieve the recording after the capture process by making a request to a URL.


How to retrieve the recorded video of the extraction

Remote recording (default)

Once the extraction process is complete, the recorded video will be provided as a blob file from a URL blob (string).

The following variables must be configured to retrieve the generated video:

  • Operation ID: ID generated and provided by the SDK Provider. It can be obtained from the events emitOperationId or emitData.

  • Video Recording ApiKey: API Key required by Video Provider. Provided by the Facephi team.

  • Video Recording URL: URL from which the recorded video will be downloaded. Provided by the Facephi team.

How to retrieve the generated video

The API key must be added to the request header:

fetch('https://example.url/operation-id-value', { headers: { 'x-api-key': process.env.VIDEO_RECORDING_APIKEY } });

Video request example

const apiKey = process.env.VIDEO_PROVIDER_APIKEY; // Secret key provided by the Facephi team
const videoRecordingUrl = 'https://example.url'; // URL provided by the Facephi team
const operationId = 'operation-id-value'; // Value obtained from the emitOperationId event

function fetchVideo() {
  const url = `${videoRecordingUrl}/${operationId}`;

  fetch(url, {
    headers: {
      'x-api-key': apiKey,
    },
  })
    .then((response) => response.text())
    .then((data) => {
      console.log('Generated video:', data); // The recorded video blob will be provided as a URL (string)
    });
}

If the generated video is too short (less than two seconds), or if the request is made too soon after the extraction process finishes, the request may fail.


Local recording

Examples of how to use the video:

Last updated