import { TypedEventEmitter } from '../core'; import { MediaStreamService } from '../core/media-stream'; import { BackgroundBlurParams, BlurMode } from './effects/background-blur-effect'; import { BackgroundFitMode, VirtualBackgroundParams } from './effects/virtual-background-effect'; import { IVideoEffect, PerformanceConfig, PipelineState, QualityPreset } from './types'; export interface EffectsState { isProcessingEnabled: boolean; activeEffects: string[]; currentFps: number; blur: { isEnabled: boolean; intensity: number; mode: BlurMode; }; virtualBackground: { isEnabled: boolean; image: string | null; }; performance?: PerformanceConfig; } export type EffectsStateChangeCallback = (state: EffectsState) => void; export type EffectsErrorCallback = (error: { source: string; action?: string; error: unknown; }) => void; export declare enum EffectsEvents { STATE_CHANGED = "stateChanged", EFFECT_ENABLED = "effectEnabled", EFFECT_DISABLED = "effectDisabled", EFFECT_ADDED = "effectAdded", EFFECT_REMOVED = "effectRemoved", PROCESSING_STARTED = "processingStarted", PROCESSING_STOPPED = "processingStopped", ERROR = "error", QUALITY_CHANGED = "quality:changed", PERFORMANCE_CHANGED = "performance:changed" } interface EffectsEventMap { [EffectsEvents.STATE_CHANGED]: (state: EffectsState) => void; [EffectsEvents.EFFECT_ENABLED]: (data: { effect: string; }) => void; [EffectsEvents.EFFECT_DISABLED]: (data: { effect: string; }) => void; [EffectsEvents.EFFECT_ADDED]: (data: { effect: string; }) => void; [EffectsEvents.EFFECT_REMOVED]: (data: { effect: string; }) => void; [EffectsEvents.PROCESSING_STARTED]: () => void; [EffectsEvents.PROCESSING_STOPPED]: () => void; [EffectsEvents.ERROR]: (error: { source: string; action?: string; error: unknown; }) => void; [EffectsEvents.QUALITY_CHANGED]: (data: { preset: QualityPreset; }) => void; [EffectsEvents.PERFORMANCE_CHANGED]: (config: PerformanceConfig) => void; } export declare class EffectsController extends TypedEventEmitter { private mediaStreamService; private blurEffect; private virtualBackgroundEffect; private stateCallbacks; private errorCallbacks; private processingActive; constructor(mediaStreamService: MediaStreamService); private requirePipeline; addEffect: (effect: IVideoEffect) => Promise; removeEffect: (name: string) => void; getEffect: (name: string) => T | null; getEffects: () => IVideoEffect[]; reorderEffects: (order: string[]) => void; enableBlur: (params?: Partial) => Promise; disableBlur: () => void; toggleBlur: () => Promise; setBlurIntensity: (intensity: number) => void; setBlurMode: (mode: BlurMode) => void; updateBlurParams: (params: Partial) => void; getBlurParams: () => BackgroundBlurParams | null; setVirtualBackground: (imageUrl: string) => Promise; removeVirtualBackground: () => void; toggleVirtualBackground: (imageUrl?: string) => Promise; setVirtualBackgroundColor: (color: string) => Promise; setVirtualBackgroundFitMode: (mode: BackgroundFitMode) => void; updateVirtualBackgroundParams: (params: Partial) => void; getVirtualBackgroundParams: () => VirtualBackgroundParams | null; setQualityPreset: (preset: QualityPreset) => void; setPerformanceConfig: (config: PerformanceConfig) => void; getPerformanceConfig: () => PerformanceConfig; setBlurQuality: (quality: number) => void; setTargetFps: (fps: number) => void; disableAllEffects: () => void; stopProcessing: () => void; get state(): EffectsState; getPipelineState: () => PipelineState | null; onStateChange: (callback: EffectsStateChangeCallback) => VoidFunction; onError(callback: EffectsErrorCallback): VoidFunction; destroy(): void; private maybeSuspendPipeline; private notifyStateChange; private notifyError; } export {};