@webex/web-media-effects-types 2.28.2 → 2.29.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 +11 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import TypedEmitter from 'typed-emitter';
|
|
2
|
-
import { IFrameInferenceResult,
|
|
3
|
-
export { BlurStrength,
|
|
2
|
+
import { IFrameInferenceResult, Quality, BlurStrength, Pipeline } from '@webex/ladon-ts';
|
|
3
|
+
export { BlurStrength, Quality } from '@webex/ladon-ts';
|
|
4
4
|
import * as js_logger from 'js-logger';
|
|
5
5
|
export { default as Logger } from 'js-logger';
|
|
6
6
|
|
|
@@ -276,6 +276,7 @@ declare type LadonOverrides = {
|
|
|
276
276
|
modelRank?: number;
|
|
277
277
|
workerUri?: string;
|
|
278
278
|
executionProviders?: string[];
|
|
279
|
+
generationIntervalMs?: number;
|
|
279
280
|
inputSize?: {
|
|
280
281
|
width: number;
|
|
281
282
|
height: number;
|
|
@@ -291,7 +292,6 @@ declare type LadonOverrides = {
|
|
|
291
292
|
modelUrlResolver?: (modelPath: string) => Promise<string>;
|
|
292
293
|
};
|
|
293
294
|
interface VirtualBackgroundEffectOptions extends EffectOptions {
|
|
294
|
-
generator: Generator;
|
|
295
295
|
mode: VirtualBackgroundMode;
|
|
296
296
|
quality: Quality;
|
|
297
297
|
frameRate?: number;
|
|
@@ -324,8 +324,8 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
324
324
|
private preloadFuture?;
|
|
325
325
|
private loadFuture?;
|
|
326
326
|
private disposeFuture?;
|
|
327
|
+
private updateFuture?;
|
|
327
328
|
private lastFrameTime;
|
|
328
|
-
private frameInterval;
|
|
329
329
|
private restoreEffectOnTrackEnable;
|
|
330
330
|
private setTimeoutId?;
|
|
331
331
|
private rafId?;
|
|
@@ -339,6 +339,7 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
339
339
|
get isReady(): boolean;
|
|
340
340
|
get isLoaded(): boolean;
|
|
341
341
|
get frameRate(): number;
|
|
342
|
+
get frameInterval(): number;
|
|
342
343
|
constructor(options?: Partial<VirtualBackgroundEffectOptions>);
|
|
343
344
|
preloadAssets(): Promise<void>;
|
|
344
345
|
loadMediaStream(input: MediaStream): Promise<MediaStream>;
|
|
@@ -384,6 +385,7 @@ declare abstract class BaseInferencePlugin<T, O> {
|
|
|
384
385
|
protected core: T;
|
|
385
386
|
protected options: O;
|
|
386
387
|
protected isEffectEnabled: boolean;
|
|
388
|
+
protected baseInferenceCleanup?: () => void;
|
|
387
389
|
isInitialized: boolean;
|
|
388
390
|
constructor(options?: Partial<O>);
|
|
389
391
|
initialize(effect: VirtualBackgroundEffect): void;
|
|
@@ -408,6 +410,7 @@ declare abstract class BaseEventEmitterPlugin<T extends EventEmitter<unknown>, O
|
|
|
408
410
|
}
|
|
409
411
|
|
|
410
412
|
declare abstract class BaseAfterInferencePlugin<T extends EventEmitter<unknown> = EventEmitter<unknown>, O extends object = Record<string, never>> extends BaseEventEmitterPlugin<T, O> {
|
|
413
|
+
private afterInferenceCleanup?;
|
|
411
414
|
constructor(options?: Partial<O>);
|
|
412
415
|
initialize(effect: VirtualBackgroundEffect): void;
|
|
413
416
|
dispose(): void;
|
|
@@ -515,6 +518,7 @@ interface RateEstimatedValues {
|
|
|
515
518
|
rate?: number;
|
|
516
519
|
status: RateEstimatorStatus;
|
|
517
520
|
threshold: number;
|
|
521
|
+
targetRate: number;
|
|
518
522
|
}
|
|
519
523
|
interface RateEstimatorOptions {
|
|
520
524
|
hysteresisMargin: number;
|
|
@@ -522,6 +526,7 @@ interface RateEstimatorOptions {
|
|
|
522
526
|
lowThreshold: number;
|
|
523
527
|
minSamples: number;
|
|
524
528
|
maxSamples: number;
|
|
529
|
+
targetRate: number;
|
|
525
530
|
}
|
|
526
531
|
declare enum RateEstimatorEvent {
|
|
527
532
|
RateOk = "rate-ok",
|
|
@@ -567,9 +572,11 @@ declare class RateEstimationPlugin extends BaseAfterInferencePlugin<RateEstimato
|
|
|
567
572
|
onEffectEnabled(): void;
|
|
568
573
|
destroyCore(): void;
|
|
569
574
|
onAfterInference(timestamp: number): Promise<void>;
|
|
575
|
+
onOptionsUpdated(): void;
|
|
570
576
|
getRate(): number | undefined;
|
|
571
577
|
getThreshold(): number | undefined;
|
|
572
578
|
getStatus(): RateEstimatorStatus | undefined;
|
|
579
|
+
getTargetRate(): number | undefined;
|
|
573
580
|
}
|
|
574
581
|
|
|
575
582
|
declare class SkippedFrameRatePlugin extends BaseAfterInferencePlugin {
|