Config: UrlParams to control noiseSuppression and echoCancellation

This commit is contained in:
Valere
2025-11-25 11:10:53 +01:00
parent 3491a68362
commit e2607d6399
5 changed files with 195 additions and 1 deletions

View File

@@ -332,6 +332,41 @@ describe("UrlParams", () => {
expect(computeUrlParams("?intent=join_existing").skipLobby).toBe(false);
});
});
describe("noiseSuppression", () => {
it("defaults to true", () => {
expect(computeUrlParams().noiseSuppression).toBe(true);
});
it("is parsed", () => {
expect(computeUrlParams("?intent=start_call&noiseSuppression=true").noiseSuppression).toBe(
true,
);
expect(computeUrlParams("?intent=start_call&noiseSuppression&bar=foo").noiseSuppression).toBe(
true,
);
expect(computeUrlParams("?noiseSuppression=false").noiseSuppression).toBe(
false,
);
});
});
describe("echoCancellation", () => {
it("defaults to true", () => {
expect(computeUrlParams().echoCancellation).toBe(true);
});
it("is parsed", () => {
expect(computeUrlParams("?echoCancellation=true").echoCancellation).toBe(
true,
);
expect(computeUrlParams("?echoCancellation=false").echoCancellation).toBe(
false,
);
});
});
describe("header", () => {
it("uses header if provided", () => {
expect(computeUrlParams("?header=app_bar&hideHeader=true").header).toBe(