Add enableClientWellKnownLookups

Gate client well-known lookups on enableClientWellKnownLookups

New URL param (default on), threaded from the embedder. When off, always
avoid client .well-known: skip the post-login poll (widget + SPA) and the
legacy MatrixRTC foci fallback. When on/unset, respect the transports
endpoint response: only fall back to .well-known on a 404 M_UNRECOGNIZED.
This commit is contained in:
David Langley
2026-07-10 18:49:10 +01:00
parent 59999b9b37
commit 23a9e0c85e
6 changed files with 212 additions and 74 deletions

View File

@@ -44,6 +44,7 @@ import {
} from "../../../livekit/openIDSFU.ts";
import { areLivekitTransportsEqual } from "../remoteMembers/MatrixLivekitMembers.ts";
import { customLivekitUrl } from "../../../settings/settings.ts";
import { getUrlParams } from "../../../UrlParams.ts";
import { RtcTransportAutoDiscovery } from "./RtcTransportAutoDiscovery.ts";
const logger = rootLogger.getChild("[LocalTransport]");
@@ -147,6 +148,7 @@ export const createLocalTransport$ = ({
const transportDiscovery = new RtcTransportAutoDiscovery({
client: client,
resolvedConfig: Config.get(),
enableClientWellKnownLookups: getUrlParams().enableClientWellKnownLookups,
wellKnownFetcher: AutoDiscovery.getRawClientConfig.bind(AutoDiscovery),
logger: logger,
});