Name the background effect pieces after background effects

- One name, as review asked: TrackProcessorContext becomes
  BackgroundEffectsContext, with BackgroundEffectsProvider,
  BackgroundEffectsState, useBackgroundEffects,
  useBackgroundEffectsState$ and useSyncBackgroundEffects.
- The state's Behavior is backgroundEffectsState$ wherever it is passed,
  in place of trackProcessorState$, trackerProcessorState$ and
  processorState$.
- Renames only: nothing changes in behaviour.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
fkwp
2026-10-08 12:22:34 +02:00
co-authored by Claude Opus 5.5
parent cbb22a0094
commit e9365b85b5
22 changed files with 115 additions and 108 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ import { deepCompare } from "matrix-js-sdk/lib/utils";
import { type Behavior } from "./Behavior";
import { type ObservableScope } from "./ObservableScope";
import { type ProcessorState } from "../livekit/TrackProcessorContext";
import { type BackgroundEffectsState } from "../livekit/BackgroundEffectsContext";
const blurRadius = 15;
@@ -30,7 +30,7 @@ export interface BackgroundEffectsOptions {
/** The background effect pipeline, as the camera tracks and the menus see it. */
export class BackgroundEffects {
public readonly state$: Behavior<ProcessorState>;
public readonly state$: Behavior<BackgroundEffectsState>;
public constructor(
scope: ObservableScope,
@@ -38,7 +38,7 @@ export class BackgroundEffects {
) {
this.state$ = scope.behavior(
blur$.pipe(
scan<boolean, ProcessorState>(
scan<boolean, BackgroundEffectsState>(
(previous, wanted) => {
// Attached the first time an effect is wanted and never detached
// after, so someone who never turns one on pays for none of it.