From 1e5f5c4fe9cefdee51ea89c07d887987cad895cf Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Sat, 11 Jul 2026 15:11:40 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20refactor=20backg?= =?UTF-8?q?round=20processors=20to=20use=20the=20new=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the calls to the background processors imported from livekit-track-processor so they use the new instantiation method instead of the previous, now-deprecated one. --- CHANGELOG.md | 1 + .../blur/UnifiedBackgroundTrackProcessor.ts | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 881de225..16120c3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to - 🗑️(settings) deprecate SUMMARY_SERVICE_VERSION=1 - ⬆️(mail) update mjml to v5 and @html-to/text-cli - 🚸(frontend) initialize the join input name with the persisted full name +- ♻️(frontend) refactor background processors to use the new API ### Fixed diff --git a/src/frontend/src/features/rooms/livekit/components/blur/UnifiedBackgroundTrackProcessor.ts b/src/frontend/src/features/rooms/livekit/components/blur/UnifiedBackgroundTrackProcessor.ts index 1db7bed8..0bf9c4bb 100644 --- a/src/frontend/src/features/rooms/livekit/components/blur/UnifiedBackgroundTrackProcessor.ts +++ b/src/frontend/src/features/rooms/livekit/components/blur/UnifiedBackgroundTrackProcessor.ts @@ -1,8 +1,7 @@ import type { ProcessorOptions, Track } from 'livekit-client' import { - BackgroundBlur, ProcessorWrapper, - VirtualBackground, + BackgroundProcessor, } from '@livekit/track-processors' import { type ProcessorConfig, @@ -20,10 +19,16 @@ export class UnifiedBackgroundTrackProcessor implements BackgroundProcessorInter if (opts.type === 'virtual') { this.processorType = ProcessorType.VIRTUAL - this.processor = VirtualBackground(opts.imagePath) + this.processor = BackgroundProcessor({ + mode: 'virtual-background', + imagePath: opts.imagePath, + }) } else if (opts.type === 'blur') { this.processorType = ProcessorType.BLUR - this.processor = BackgroundBlur(opts.blurRadius) + this.processor = BackgroundProcessor({ + mode: 'background-blur', + blurRadius: opts.blurRadius, + }) } else { throw new Error( 'Must provide either imagePath for virtual background or blurRadius for blur'