Get blurring working again

This commit is contained in:
Robin
2025-04-22 18:32:01 +02:00
parent 7142122a74
commit 63ad4a3ad3
2 changed files with 6 additions and 1 deletions

View File

@@ -54,9 +54,14 @@ export class BlurBackgroundTransformer extends BackgroundTransformer {
delegate: "GPU", delegate: "GPU",
...this.options.segmenterOptions, ...this.options.segmenterOptions,
}, },
canvas: this.canvas,
runningMode: "VIDEO", runningMode: "VIDEO",
outputCategoryMask: true, outputCategoryMask: true,
outputConfidenceMasks: false, outputConfidenceMasks: false,
}); });
if (this.options.blurRadius) {
this.gl?.setBlurRadius(this.options.blurRadius);
}
} }
} }

View File

@@ -90,7 +90,7 @@ export const ProcessorProvider: FC<Props> = ({ children }) => {
try { try {
if (!blur.current) { if (!blur.current) {
blur.current = new ProcessorWrapper( blur.current = new ProcessorWrapper(
new BlurBackgroundTransformer({}), new BlurBackgroundTransformer({ blurRadius: 15 }),
"background-blur", "background-blur",
); );
} }