From 7412c0234132c311f242e72636b5516a9e2a851b Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 2 Sep 2026 23:47:09 +0200 Subject: [PATCH] fixup! wip enhance analytics --- .../rooms/livekit/components/blur/index.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/features/rooms/livekit/components/blur/index.ts b/src/frontend/src/features/rooms/livekit/components/blur/index.ts index 50c183fc..bee80910 100644 --- a/src/frontend/src/features/rooms/livekit/components/blur/index.ts +++ b/src/frontend/src/features/rooms/livekit/components/blur/index.ts @@ -32,6 +32,8 @@ export interface BackgroundProcessorInterface extends TrackProcessor options: ProcessorConfig } +let unsupportedReported = false + export class BackgroundProcessorFactory { private static _isSupported?: boolean @@ -45,7 +47,8 @@ export class BackgroundProcessorFactory { supportsBackgroundProcessors() || BackgroundCustomProcessor.isSupported } - if (!this._isSupported) { + if (!this._isSupported && !unsupportedReported) { + unsupportedReported = true captureEvent('background-processor-unsupported', { path: 'isSupported', }) @@ -60,6 +63,8 @@ export class BackgroundProcessorFactory { const isBlur = config.type === ProcessorType.BLUR const isVirtual = config.type === ProcessorType.VIRTUAL + return new BackgroundCustomProcessor(config) + if (!isBlur && !isVirtual) return undefined if (supportsBackgroundProcessors()) { @@ -70,9 +75,11 @@ export class BackgroundProcessorFactory { return new BackgroundCustomProcessor(config) } - captureEvent('background-processor-unsupported', { - path: 'getProcessor', - }) + if (!unsupportedReported) { + captureEvent('background-processor-unsupported', { + path: 'getProcessor', + }) + } return undefined }