import BackgroundFilterSpec from '../backgroundfilter/BackgroundFilterSpec'; import BackgroundFilterVideoFrameProcessor from '../backgroundfilter/BackgroundFilterVideoFrameProcessor'; import Logger from '../logger/Logger'; import BackgroundBlurOptions from './BackgroundBlurOptions'; import BackgroundBlurProcessor from './BackgroundBlurProcessor'; /** * [[BackgroundBlurVideoFrameProcessor]] * Creates a background blur processor which identifies the foreground person and blurs the background. */ export default class BackgroundBlurVideoFrameProcessor extends BackgroundFilterVideoFrameProcessor { /** * A factory method that will call the private constructor to instantiate the processor and asynchronously * initialize the worker, wasm, and ML models. Upon completion of the initialization the promise will either * be resolved or rejected. * @param spec The spec defines the assets that will be used for adding background blur to a frame * @param options Background blur options including blur strength * @returns */ static create(spec?: BackgroundFilterSpec, options?: BackgroundBlurOptions): Promise; /** * Based on the options that are passed in set defaults for options * @param options the options that are passed in * @returns An updated set of options with defaults set */ protected static resolveOptions(options?: BackgroundBlurOptions): BackgroundBlurOptions; /** * This method will detect the environment in which it is being used and determine if background * blur can be used. * @param spec The {@link BackgroundFilterSpec} spec that will be used to initialize assets * @param options options such as logger * @returns a boolean promise that will resolve to true if supported and false if not */ static isSupported(spec?: BackgroundFilterSpec, options?: { logger?: Logger; }): Promise; }