mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user