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

generateSelphiBrowserCache

Preloads Selphi engine resources before mounting the component.

Details

Download the Selphi engine resources before the component is integrated into the DOM to reduce its load.

Syntax

import { generateSelphiBrowserCache } from '@facephi/sdk-web-wc';

await generateSelphiBrowserCache('...');

Description

Function exported by @facephi/sdk-web-wc to preload the Selphi bundle and reduce the initial load time.

Considerations

If used, this method must be invoked before mounting the Selphi Widget in the DOM; otherwise, this step is not necessary. The License must include Selphi Widget.


Example

import { generateSelphiBrowserCache } from '@facephi/sdk-web-wc';

await generateSelphiBrowserCache('...');

<facephi-sdk-provider apikey={process.env.FACEPHI_SDK_APIKEY} />

Last updated