@webex/web-media-effects-types 2.29.0 → 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +121 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -261,10 +261,57 @@ declare class PluginManager {
|
|
|
261
261
|
dispose(): void;
|
|
262
262
|
getPlugin<T extends PluginType>(name: string): T | undefined;
|
|
263
263
|
getPlugins(): Map<string, Plugin>;
|
|
264
|
+
getPluginCount(): number;
|
|
264
265
|
}
|
|
265
266
|
|
|
266
267
|
declare function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(func: F, delay: number): (...args: Parameters<F>) => void;
|
|
267
268
|
|
|
269
|
+
interface DebugStats {
|
|
270
|
+
frameRate: number;
|
|
271
|
+
modelReady: boolean;
|
|
272
|
+
effectEnabled: boolean;
|
|
273
|
+
trackEnabled: boolean;
|
|
274
|
+
mode: string;
|
|
275
|
+
quality: string;
|
|
276
|
+
frameInterval: number;
|
|
277
|
+
lastFrameTime: number;
|
|
278
|
+
inputDimensions: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
};
|
|
282
|
+
outputDimensions: {
|
|
283
|
+
width: number;
|
|
284
|
+
height: number;
|
|
285
|
+
};
|
|
286
|
+
videoWidth?: number;
|
|
287
|
+
videoHeight?: number;
|
|
288
|
+
videoFrameRate?: number;
|
|
289
|
+
cpuCores: number;
|
|
290
|
+
deviceMemory?: number;
|
|
291
|
+
connectionType?: string;
|
|
292
|
+
effectiveType?: string;
|
|
293
|
+
memoryUsage?: number;
|
|
294
|
+
webglVendor?: string;
|
|
295
|
+
webglRenderer?: string;
|
|
296
|
+
maxTextureSize?: number;
|
|
297
|
+
imageCaptureActive: boolean;
|
|
298
|
+
trackProcessorActive: boolean;
|
|
299
|
+
pluginCount: number;
|
|
300
|
+
totalFrameTime?: number;
|
|
301
|
+
modelInferenceTime?: number;
|
|
302
|
+
preprocessingTime?: number;
|
|
303
|
+
postprocessingTime?: number;
|
|
304
|
+
inferenceSkipped?: boolean;
|
|
305
|
+
modelInferenceFPS?: number;
|
|
306
|
+
averageFrameTime?: number;
|
|
307
|
+
frameDrops?: number;
|
|
308
|
+
computePressure?: {
|
|
309
|
+
state: 'nominal' | 'fair' | 'serious' | 'critical';
|
|
310
|
+
source: string;
|
|
311
|
+
};
|
|
312
|
+
errors: string[];
|
|
313
|
+
}
|
|
314
|
+
|
|
268
315
|
declare enum VirtualBackgroundMode {
|
|
269
316
|
Blur = "BLUR",
|
|
270
317
|
Image = "IMAGE",
|
|
@@ -329,13 +376,14 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
329
376
|
private restoreEffectOnTrackEnable;
|
|
330
377
|
private setTimeoutId?;
|
|
331
378
|
private rafId?;
|
|
332
|
-
private
|
|
379
|
+
private lastInferenceResult?;
|
|
333
380
|
private pluginManager;
|
|
334
381
|
private beforeInferenceCallbacks;
|
|
335
382
|
private afterInferenceCallbacks;
|
|
336
383
|
private offscreenCanvas?;
|
|
337
384
|
private inputCanvasContext?;
|
|
338
385
|
private configBuilder;
|
|
386
|
+
private debugStatsGenerator;
|
|
339
387
|
get isReady(): boolean;
|
|
340
388
|
get isLoaded(): boolean;
|
|
341
389
|
get frameRate(): number;
|
|
@@ -378,6 +426,7 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
378
426
|
initializePlugins: () => void;
|
|
379
427
|
getPlugin: <T extends PluginType>(name: string) => T | undefined;
|
|
380
428
|
getPluginManager: () => PluginManager;
|
|
429
|
+
getStats(): DebugStats;
|
|
381
430
|
}
|
|
382
431
|
declare const createVirtualBackgroundEffect: (options?: VirtualBackgroundEffectOptions, preloadAssets?: boolean) => Promise<VirtualBackgroundEffect>;
|
|
383
432
|
|
|
@@ -429,6 +478,76 @@ declare class BeRightBackPlugin extends BaseAfterInferencePlugin<BeRightBack, Be
|
|
|
429
478
|
declare function getOptionsByMode(mode: BeRightBackPluginMode): BeRightBackOptions;
|
|
430
479
|
declare function makeBeRightBackOptions(mode: BeRightBackPluginMode, coreOptions?: Partial<BeRightBackOptions>): BeRightBackOptions;
|
|
431
480
|
|
|
481
|
+
interface DebugOverlayCoreOptions {
|
|
482
|
+
showOnInit?: boolean;
|
|
483
|
+
updateInterval?: number;
|
|
484
|
+
maxErrors?: number;
|
|
485
|
+
}
|
|
486
|
+
interface DebugOverlayPluginOptions {
|
|
487
|
+
debug?: boolean;
|
|
488
|
+
coreOptions?: DebugOverlayCoreOptions;
|
|
489
|
+
}
|
|
490
|
+
declare const DEFAULT_DEBUG_OVERLAY_OPTIONS: DebugOverlayPluginOptions;
|
|
491
|
+
|
|
492
|
+
declare class DebugOverlay extends EventEmitter<unknown> {
|
|
493
|
+
private getStats?;
|
|
494
|
+
private overlay?;
|
|
495
|
+
private statsContainer?;
|
|
496
|
+
private header?;
|
|
497
|
+
private resizeHandle?;
|
|
498
|
+
private sectionsCreated;
|
|
499
|
+
private sectionElements;
|
|
500
|
+
private effect?;
|
|
501
|
+
private pressureObserver?;
|
|
502
|
+
private isVisible;
|
|
503
|
+
private options;
|
|
504
|
+
private isResizing;
|
|
505
|
+
private startX;
|
|
506
|
+
private startY;
|
|
507
|
+
private startWidth;
|
|
508
|
+
private startHeight;
|
|
509
|
+
private updateInterval?;
|
|
510
|
+
private dom;
|
|
511
|
+
private styles;
|
|
512
|
+
private stats;
|
|
513
|
+
constructor(options?: Partial<DebugOverlayCoreOptions>);
|
|
514
|
+
show(): void;
|
|
515
|
+
hide(): void;
|
|
516
|
+
toggle(): void;
|
|
517
|
+
get visible(): boolean;
|
|
518
|
+
setStatsProvider(getStatsCallback: () => DebugStats): void;
|
|
519
|
+
private updateDisplayStats;
|
|
520
|
+
private showStatsError;
|
|
521
|
+
private hideStatsError;
|
|
522
|
+
private startUpdateInterval;
|
|
523
|
+
private stopUpdateInterval;
|
|
524
|
+
static getDefaultStats(): DebugStats;
|
|
525
|
+
private createOverlay;
|
|
526
|
+
private createStatsSections;
|
|
527
|
+
private renderStats;
|
|
528
|
+
private updateSectionContent;
|
|
529
|
+
private resetSections;
|
|
530
|
+
private setupKeyboardListener;
|
|
531
|
+
private setupPerformanceMonitoring;
|
|
532
|
+
private setupDragToMove;
|
|
533
|
+
private setupResizeHandlers;
|
|
534
|
+
dispose(): void;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
declare class DebugOverlayPlugin extends BaseAfterInferencePlugin<DebugOverlay, DebugOverlayPluginOptions> {
|
|
538
|
+
protected getDefaultOptions(): DebugOverlayPluginOptions;
|
|
539
|
+
protected createCore(): DebugOverlay;
|
|
540
|
+
protected onCoreCreated(): void;
|
|
541
|
+
initialize(effect: VirtualBackgroundEffect): void;
|
|
542
|
+
getDebugOverlay(): DebugOverlay;
|
|
543
|
+
show(): void;
|
|
544
|
+
hide(): void;
|
|
545
|
+
toggle(): void;
|
|
546
|
+
get visible(): boolean;
|
|
547
|
+
onAfterInference(timestamp: number, inferenceResult?: IFrameInferenceResult): Promise<void>;
|
|
548
|
+
dispose(): void;
|
|
549
|
+
}
|
|
550
|
+
|
|
432
551
|
interface FrameSkipperOptions {
|
|
433
552
|
baseMinSkipTime: number;
|
|
434
553
|
baseMaxSkipTime: number;
|
|
@@ -591,4 +710,4 @@ declare class SkippedFrameRatePlugin extends BaseAfterInferencePlugin {
|
|
|
591
710
|
declare const logger: js_logger.ILogger;
|
|
592
711
|
//# sourceMappingURL=logger.d.ts.map
|
|
593
712
|
|
|
594
|
-
export { AdaptiveFrameSkipper, BaseCameraEffect, BaseEffect, BaseMicrophoneEffect, BeRightBack, BeRightBackAction, BeRightBackDebugInfo, BeRightBackEvent, BeRightBackEventCallback, BeRightBackOptions, BeRightBackPlugin, BeRightBackPluginMode, BeRightBackPluginOptions, BeRightBackState, DEFAULT_FRAME_RATE, EffectEnv, EffectEvent, EffectEventCallback, EffectOptions, EffectState, FrameSkipperDebugInfo, FrameSkipperInferenceReason, FrameSkipperOptions, FrameSkipperPlugin, FrameSkipperPluginMode, FrameSkipperPluginOptions, GainEffect, LadonOverrides, MediaStreamOrTrack, NoiseReductionEffect, NoiseReductionEffectOptions, NoiseReductionMode, RateEstimatedValues, RateEstimationPlugin, RateEstimationPluginOptions, RateEstimator, RateEstimatorEvent, RateEstimatorEventCallback, RateEstimatorOptions, RateEstimatorStatus, SkippedFrameRatePlugin, TrackEffect, VirtualBackgroundEffect, VirtualBackgroundEffectOptions, VirtualBackgroundMode, createEffect, createNoiseReductionEffect, createVirtualBackgroundEffect, getOptionsByMode, logger, makeBeRightBackOptions, makeFrameSkipperOptions };
|
|
713
|
+
export { AdaptiveFrameSkipper, BaseCameraEffect, BaseEffect, BaseMicrophoneEffect, BeRightBack, BeRightBackAction, BeRightBackDebugInfo, BeRightBackEvent, BeRightBackEventCallback, BeRightBackOptions, BeRightBackPlugin, BeRightBackPluginMode, BeRightBackPluginOptions, BeRightBackState, DEFAULT_DEBUG_OVERLAY_OPTIONS, DEFAULT_FRAME_RATE, DebugOverlay, DebugOverlayCoreOptions, DebugOverlayPlugin, DebugOverlayPluginOptions, EffectEnv, EffectEvent, EffectEventCallback, EffectOptions, EffectState, FrameSkipperDebugInfo, FrameSkipperInferenceReason, FrameSkipperOptions, FrameSkipperPlugin, FrameSkipperPluginMode, FrameSkipperPluginOptions, GainEffect, LadonOverrides, MediaStreamOrTrack, NoiseReductionEffect, NoiseReductionEffectOptions, NoiseReductionMode, RateEstimatedValues, RateEstimationPlugin, RateEstimationPluginOptions, RateEstimator, RateEstimatorEvent, RateEstimatorEventCallback, RateEstimatorOptions, RateEstimatorStatus, SkippedFrameRatePlugin, TrackEffect, VirtualBackgroundEffect, VirtualBackgroundEffectOptions, VirtualBackgroundMode, createEffect, createNoiseReductionEffect, createVirtualBackgroundEffect, getOptionsByMode, logger, makeBeRightBackOptions, makeFrameSkipperOptions };
|