import RTKMeeting from '@cloudflare/realtimekit'; import { SegmentationConfig } from '../core/helpers/segmentationHelper'; import { TFLite } from '../core/hooks/useTFLite'; export type BlendMode = 'screen' | 'linearDodge'; export type JointBilateralFilterConfig = { sigmaSpace: number; sigmaColor: number; }; export type PostProcessingConfig = { smoothSegmentationMask: boolean; jointBilateralFilter: JointBilateralFilterConfig; coverage: [number, number]; lightWrapping: number; blendMode: BlendMode; }; export interface InitParams { meeting: RTKMeeting; segmentationConfig: SegmentationConfig; postProcessingConfig: PostProcessingConfig; tflite: TFLite; } export default class RealtimeKitVideoBackgroundTransformer { #private; private constructor(); /** * The `init` method can be used to instantiate the RealtimeKitVideoBackgroundTransformer class. * This returns an instance of `RealtimeKitVideoBackgroundTransformer`, * which can be used to create video middlewares for RealtimeKit Meetings. */ static init({ meeting, segmentationConfig: passedSegmentationConfig, postProcessingConfig: passedPostProcessingConfig, }: { meeting: RTKMeeting; segmentationConfig?: Partial; postProcessingConfig?: Partial; }): Promise; /** * Tells if the current browser supports this middleware or not * @returns isSupported */ static isSupported(): boolean; /** * Expects a static background image url and returns a video middleware * which adds the given image url as the background. * @param staticBackgroundImageURL * @returns VideoMiddleware */ createStaticBackgroundVideoMiddleware(staticBackgroundImageURL: string): Promise; createBackgroundBlurVideoMiddleware(blurLength?: number): Promise; destruct(): void; }