From c2b651802745bb237f251b1a5cb61c94b6d469cc Mon Sep 17 00:00:00 2001 From: Timo Date: Wed, 27 Nov 2024 20:39:45 +0100 Subject: [PATCH] dont update if processor already set --- src/livekit/useLiveKit.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/livekit/useLiveKit.ts b/src/livekit/useLiveKit.ts index f99fbabd..6e563f1c 100644 --- a/src/livekit/useLiveKit.ts +++ b/src/livekit/useLiveKit.ts @@ -151,7 +151,7 @@ export function useLiveKit( >(undefined); useEffect(() => { - // Fon't even try if we cannot blur on this platform + // Don't even try if we cannot blur on this platform if (!blur) return; if (!room || videoTrackPromise.current) return; const update = async (): Promise => { @@ -178,7 +178,10 @@ export function useLiveKit( if (publishCallback) room.off(RoomEvent.LocalTrackPublished, publishCallback); - if (videoTrack !== undefined) { + if ( + videoTrack !== undefined && + videoTrack.track?.getProcessor() === undefined + ) { if (showBackgroundBlur) { logger.info("Blur: set blur");