diff --git a/src/room/CallView.test.tsx b/src/room/CallView.test.tsx index ed747c56c..c76938c1e 100644 --- a/src/room/CallView.test.tsx +++ b/src/room/CallView.test.tsx @@ -64,7 +64,7 @@ import { type JoinCallData } from "../widget"; import { MatrixRTCTransportMissingError } from "../utils/errors"; import { BackgroundEffectsProvider, - createAppBackgroundEffects, + createAppBackgroundEffects$, } from "../tracks/BackgroundEffectsContext"; import { MediaDevicesContext } from "../MediaDevicesContext"; import { constant } from "../state/Behavior"; @@ -198,7 +198,7 @@ function createCallView( {options.withErrorBoundary ? ( diff --git a/src/room/InCallView.test.tsx b/src/room/InCallView.test.tsx index f6bc938f6..da9f2e950 100644 --- a/src/room/InCallView.test.tsx +++ b/src/room/InCallView.test.tsx @@ -51,7 +51,7 @@ import { AppBar } from "../AppBar"; import { type MatrixInfo } from "./VideoPreview"; import { BackgroundEffectsProvider, - createAppBackgroundEffects, + createAppBackgroundEffects$, } from "../tracks/BackgroundEffectsContext"; import { initializeWidget } from "../widget"; import { RootElementProvider } from "../RootElementContext"; @@ -251,7 +251,7 @@ describe("ActiveCall", () => { { { const transformer = { onFirstFrame: undefined as (() => void) | undefined, }; - const effects = createBackgroundEffects(testScope(), { + const effects = createBackgroundEffects$(testScope(), { supported: true, effect$: behavior(effect, { n: "none", b: "blur" }), setEffect: vi.fn(), @@ -116,7 +116,7 @@ describe("background effects", () => { function build( options: Partial = {}, ): BackgroundEffects { - return createBackgroundEffects(testScope(), { + return createBackgroundEffects$(testScope(), { supported: true, effect$, setEffect, diff --git a/src/state/BackgroundEffects.ts b/src/state/BackgroundEffects.ts index e9f01d7ae..d2a55545e 100644 --- a/src/state/BackgroundEffects.ts +++ b/src/state/BackgroundEffects.ts @@ -75,7 +75,7 @@ export interface BackgroundEffects { } /** Switches the pipeline as the choice changes, for as long as the scope lasts. */ -export function createBackgroundEffects( +export function createBackgroundEffects$( scope: ObservableScope, { supported, diff --git a/src/tracks/BackgroundEffectsContext.test.ts b/src/tracks/BackgroundEffectsContext.test.ts index 14ef27e9f..e84f1d8e0 100644 --- a/src/tracks/BackgroundEffectsContext.test.ts +++ b/src/tracks/BackgroundEffectsContext.test.ts @@ -12,7 +12,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { BackgroundEffectsProvider, useBackgroundEffects, - createAppBackgroundEffects, + createAppBackgroundEffects$, } from "./BackgroundEffectsContext"; import { type BackgroundEffects, @@ -70,7 +70,7 @@ describe("BackgroundEffectsProvider", () => { let effects: BackgroundEffects | undefined; const surface = (): ReturnType => createElement(BackgroundEffectsProvider, { - effects: (effects ??= createAppBackgroundEffects(testScope())), + effects: (effects ??= createAppBackgroundEffects$(testScope())), children: createElement(Surface), }); const blur = async (on: boolean): Promise => { diff --git a/src/tracks/BackgroundEffectsContext.tsx b/src/tracks/BackgroundEffectsContext.tsx index a7675b5f8..1110881f1 100644 --- a/src/tracks/BackgroundEffectsContext.tsx +++ b/src/tracks/BackgroundEffectsContext.tsx @@ -22,7 +22,7 @@ import { type ObservableScope } from "../state/ObservableScope"; import { type BackgroundEffects, type BackgroundEffectsState, - createBackgroundEffects, + createBackgroundEffects$, } from "../state/BackgroundEffects"; import { useBehavior } from "../useBehavior"; @@ -48,13 +48,13 @@ export function useBackgroundEffectsState$(): Behavior { * and teardowns take their turns through the SDK, which runs one operation * at a time on a processor. */ -export function createAppBackgroundEffects( +export function createAppBackgroundEffects$( scope: ObservableScope, ): BackgroundEffects { const transformer = new BackgroundEffectTransformer({ backgroundDisabled: true, }); - return createBackgroundEffects(scope, { + return createBackgroundEffects$(scope, { supported: supportsBackgroundProcessors(), effect$: backgroundEffectSetting.value$, setEffect: backgroundEffectSetting.setValue,