The VideoProcessors load assets dynamically depending on certain browser features.
You need to serve all the assets and provide the root path so they can be referenced properly.
These assets can be copied from the dist/build folder which you can add as part of your deployment process.
const virtualBackground = new VirtualBackgroundProcessor({
assetsPath: 'https://my-server-path/assets',
backgroundImage: img,
});
await virtualBackground.loadModel();
const blurBackground = new GaussianBlurBackgroundProcessor({
assetsPath: 'https://my-server-path/assets'
});
await blurBackground.loadModel();
OptionalblurThe background blur filter radius to use in pixels.
OptionaldeferWhether the pipeline should calculate the person mask without waiting for the current input frame to be downscaled. Setting this to true will potentially increase the output frame rate at the expense of a slight trailing effect around the person mask (Chrome only).
OptionalmaskThe blur radius to use when smoothing out the edges of the person's mask.
OptionaluseWhether to use a web worker (Chrome only).
Options passed to [[GaussianBlurBackgroundProcessor]] constructor.