dont update if processor already set

This commit is contained in:
Timo
2024-11-27 20:39:45 +01:00
committed by Hugh Nimmo-Smith
parent a6745ef34a
commit c2b6518027

View File

@@ -151,7 +151,7 @@ export function useLiveKit(
>(undefined); >(undefined);
useEffect(() => { 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 (!blur) return;
if (!room || videoTrackPromise.current) return; if (!room || videoTrackPromise.current) return;
const update = async (): Promise<void> => { const update = async (): Promise<void> => {
@@ -178,7 +178,10 @@ export function useLiveKit(
if (publishCallback) if (publishCallback)
room.off(RoomEvent.LocalTrackPublished, publishCallback); room.off(RoomEvent.LocalTrackPublished, publishCallback);
if (videoTrack !== undefined) { if (
videoTrack !== undefined &&
videoTrack.track?.getProcessor() === undefined
) {
if (showBackgroundBlur) { if (showBackgroundBlur) {
logger.info("Blur: set blur"); logger.info("Blur: set blur");