Offer background effects on any platform whose browser can run them

- The desktop rule from #4059 goes: now that the menu says where effects
  run slowly, using them there is the user's choice. A phone on the fast
  route held 99% of its frame rate and was refused; a desktop on the slow
  one held 73% and was allowed.
- Asks @livekit/track-processors directly; the wrapper module goes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
fkwp
2026-11-05 13:48:29 +01:00
committed by Timo K.
co-authored by Claude Opus 5.5
parent 7fb222ce60
commit 4e779ac4f5
5 changed files with 14 additions and 39 deletions
+3 -3
View File
@@ -250,12 +250,12 @@ describe("createCallFooterViewModel", () => {
);
}
it("offers nothing on a phone, where the pipeline would refuse them", () => {
it("offers them on a phone whose browser can run them", () => {
sdkSupportMock.mockReturnValue(true);
expect(lobbyOn("ios").selectBackgroundEffect$.value).toBeUndefined();
expect(lobbyOn("ios").selectBackgroundEffect$.value).toBeDefined();
});
it("offers them where the pipeline will honour them", () => {
it("offers them on a desktop whose browser can run them", () => {
sdkSupportMock.mockReturnValue(true);
expect(lobbyOn("desktop").selectBackgroundEffect$.value).toBeDefined();
});
+4 -4
View File
@@ -13,11 +13,11 @@ import {
switchMap,
} from "rxjs";
import { supportsAudioOutputSelection } from "livekit-client";
import {
supportsBackgroundProcessors,
usesFallbackProcessing,
} from "../tracks/backgroundProcessing";
supportsModernBackgroundProcessors,
} from "@livekit/track-processors";
import {
parseEffect,
serializeEffect,
@@ -113,7 +113,7 @@ function buildDeviceBehaviors(
);
const supported = supportsBackgroundProcessors();
const slow = usesFallbackProcessing();
const slow = !supportsModernBackgroundProcessors();
const offered$ = disableSwitcher$.pipe(
map((switcherDisabled) => !switcherDisabled && supported),
);