@webex/web-media-effects-types 2.21.4 → 2.22.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 +31 -10
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ interface EffectEventCallback {
|
|
|
47
47
|
[EffectEvent.Disposed]: () => void;
|
|
48
48
|
}
|
|
49
49
|
interface EffectOptions {
|
|
50
|
+
baseUrl?: string;
|
|
51
|
+
authToken?: string;
|
|
52
|
+
env?: EffectEnv;
|
|
50
53
|
[key: string]: unknown;
|
|
51
54
|
}
|
|
52
55
|
declare abstract class BaseEffect extends EventEmitter<EffectEventCallback> implements TrackEffect {
|
|
@@ -111,14 +114,13 @@ declare enum NoiseReductionMode {
|
|
|
111
114
|
Worklet = "WORKLET"
|
|
112
115
|
}
|
|
113
116
|
interface NoiseReductionEffectOptions extends EffectOptions {
|
|
114
|
-
authToken: string;
|
|
115
117
|
audioContext?: AudioContext;
|
|
116
|
-
mode?: NoiseReductionMode;
|
|
117
|
-
env?: EffectEnv;
|
|
118
118
|
avoidSimd?: boolean;
|
|
119
|
-
|
|
119
|
+
mode?: NoiseReductionMode;
|
|
120
120
|
legacyProcessorUrl?: string;
|
|
121
|
-
|
|
121
|
+
workletProcessorUrl?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
122
124
|
declare class NoiseReductionEffect extends BaseMicrophoneEffect {
|
|
123
125
|
static readonly kind = "noise-reduction-effect";
|
|
124
126
|
static supportsSimd: () => Promise<boolean>;
|
|
@@ -264,6 +266,25 @@ declare enum VirtualBackgroundMode {
|
|
|
264
266
|
Image = "IMAGE",
|
|
265
267
|
Video = "VIDEO"
|
|
266
268
|
}
|
|
269
|
+
type LadonOverrides = {
|
|
270
|
+
modelUri?: string;
|
|
271
|
+
modelRank?: number;
|
|
272
|
+
workerUri?: string;
|
|
273
|
+
executionProviders?: string[];
|
|
274
|
+
inputSize?: {
|
|
275
|
+
width: number;
|
|
276
|
+
height: number;
|
|
277
|
+
};
|
|
278
|
+
outputSize?: {
|
|
279
|
+
width: number;
|
|
280
|
+
height: number;
|
|
281
|
+
};
|
|
282
|
+
upscaleSize?: {
|
|
283
|
+
width: number;
|
|
284
|
+
height: number;
|
|
285
|
+
};
|
|
286
|
+
modelUrlResolver?: (modelPath: string) => Promise<string>;
|
|
287
|
+
};
|
|
267
288
|
interface VirtualBackgroundEffectOptions extends EffectOptions {
|
|
268
289
|
generator: Generator;
|
|
269
290
|
mode: VirtualBackgroundMode;
|
|
@@ -272,12 +293,10 @@ interface VirtualBackgroundEffectOptions extends EffectOptions {
|
|
|
272
293
|
blurStrength?: BlurStrength;
|
|
273
294
|
bgImageUrl?: string;
|
|
274
295
|
bgVideoUrl?: string;
|
|
275
|
-
authToken: string;
|
|
276
296
|
mirror: boolean;
|
|
277
|
-
env?: EffectEnv;
|
|
278
297
|
preventBackgroundThrottling?: boolean;
|
|
279
|
-
useLocalSegmentationWorker?: boolean;
|
|
280
298
|
canvasResolutionScaling?: number;
|
|
299
|
+
modelOverrides?: LadonOverrides;
|
|
281
300
|
}
|
|
282
301
|
|
|
283
302
|
declare const DEFAULT_FRAME_RATE = 24;
|
|
@@ -310,6 +329,7 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
310
329
|
private afterInferenceCallbacks;
|
|
311
330
|
private offscreenCanvas?;
|
|
312
331
|
private inputCanvasContext?;
|
|
332
|
+
private configBuilder;
|
|
313
333
|
get isReady(): boolean;
|
|
314
334
|
get isLoaded(): boolean;
|
|
315
335
|
get frameRate(): number;
|
|
@@ -323,6 +343,7 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
323
343
|
private requestAnimationFrameWrapper;
|
|
324
344
|
private setTimeoutWrapper;
|
|
325
345
|
private clearTimers;
|
|
346
|
+
private configureBuilder;
|
|
326
347
|
private createPipeline;
|
|
327
348
|
private loadModel;
|
|
328
349
|
private handleFrame;
|
|
@@ -335,7 +356,7 @@ declare class VirtualBackgroundEffect extends BaseCameraEffect {
|
|
|
335
356
|
private handleOrientationChange;
|
|
336
357
|
private handleVideoLoadedMetadata;
|
|
337
358
|
private handleVideoResize;
|
|
338
|
-
private
|
|
359
|
+
private handleAssetUrlResolver;
|
|
339
360
|
enable(): Promise<boolean>;
|
|
340
361
|
disable(): Promise<boolean>;
|
|
341
362
|
dispose(): Promise<void>;
|
|
@@ -556,4 +577,4 @@ declare class SkippedFrameRatePlugin extends BaseAfterInferencePlugin {
|
|
|
556
577
|
declare const logger: js_logger.ILogger;
|
|
557
578
|
//# sourceMappingURL=logger.d.ts.map
|
|
558
579
|
|
|
559
|
-
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, MediaStreamOrTrack, NoiseReductionEffect, NoiseReductionEffectOptions, NoiseReductionMode, RateEstimatedValues, RateEstimationPlugin, RateEstimationPluginOptions, RateEstimator, RateEstimatorEvent, RateEstimatorEventCallback, RateEstimatorOptions, RateEstimatorStatus, SkippedFrameRatePlugin, TrackEffect, VirtualBackgroundEffect, VirtualBackgroundEffectOptions, VirtualBackgroundMode, createEffect, createNoiseReductionEffect, createVirtualBackgroundEffect, getOptionsByMode, logger, makeBeRightBackOptions, makeFrameSkipperOptions };
|
|
580
|
+
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 };
|