Try reenabling local implementation of BlurBackgroundTransformer

This commit is contained in:
Hugh Nimmo-Smith
2025-01-06 15:53:31 +00:00
parent bb0e1f38dc
commit 96ea920e98

View File

@@ -6,8 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { import {
BackgroundBlur as backgroundBlur, ProcessorWrapper,
type ProcessorWrapper,
type BackgroundOptions, type BackgroundOptions,
} from "@livekit/track-processors"; } from "@livekit/track-processors";
import { import {
@@ -26,6 +25,7 @@ import {
backgroundBlur as backgroundBlurSettings, backgroundBlur as backgroundBlurSettings,
useSetting, useSetting,
} from "../settings/settings"; } from "../settings/settings";
import { BlurBackgroundTransformer } from "./BlurBackgroundTransformer";
type ProcessorState = { type ProcessorState = {
supported: boolean | undefined; supported: boolean | undefined;
@@ -89,15 +89,10 @@ export const ProcessorProvider: FC<Props> = ({ children }) => {
if (!shouldCheckSupport) return; if (!shouldCheckSupport) return;
try { try {
if (!blur.current) { if (!blur.current) {
// TODO: move to our own local version of the transformer. blur.current = new ProcessorWrapper(
// Currently this is broken: error when trying to pipe IndexSizeError: Failed to construct 'ImageData': The source width is zero or not a number. new BlurBackgroundTransformer({}),
// blur.current = new ProcessorWrapper( "background-blur",
// new BlurBackgroundTransformer({}), );
// "background-blur",
// );
// eslint-disable-next-line new-cap
blur.current = backgroundBlur();
} }
setProcessorState({ setProcessorState({
checkSupported, checkSupported,