import BackgroundFilterSpec from '../backgroundfilter/BackgroundFilterSpec'; import BackgroundFilterVideoFrameProcessor from '../backgroundfilter/BackgroundFilterVideoFrameProcessor'; import BackgroundReplacementProcessor from '../backgroundreplacementprocessor/BackgroundReplacementProcessor'; import BackgroundReplacementOptions from './BackgroundReplacementOptions'; /** * [[BackgroundReplacementVideoFrameProcessor]] * Creates a background replacement processor which identifies the foreground person and replaces the background. */ export default class BackgroundReplacementVideoFrameProcessor 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 filter to a frame * @param options Background replacement options including image path */ static create(spec?: BackgroundFilterSpec, options?: BackgroundReplacementOptions): 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?: BackgroundReplacementOptions): BackgroundReplacementOptions; private static resolveOptionsAsync; /** * This method will detect the environment in which it is being used and determine if background * replacement can be used. * @param spec The {@link BackgroundFilterSpec} spec that will be used to initialize assets * @param options options such as logger and imagePath * @returns a boolean promise that will resolve to true if supported and false if not */ static isSupported(spec?: BackgroundFilterSpec, options?: BackgroundReplacementOptions): Promise; }