Merge branch 'livekit' into remove-walkie-talkie

This commit is contained in:
Robin
2023-09-18 11:58:45 -04:00
8 changed files with 198 additions and 57 deletions

View File

@@ -90,6 +90,22 @@ interface UrlParams {
password: string | null;
}
export function editFragmentQuery(
hash: string,
edit: (params: URLSearchParams) => URLSearchParams
): string {
const fragmentQueryStart = hash.indexOf("?");
const fragmentParams = edit(
new URLSearchParams(
fragmentQueryStart === -1 ? "" : hash.substring(fragmentQueryStart)
)
);
return `${hash.substring(
0,
fragmentQueryStart
)}?${fragmentParams.toString()}`;
}
/**
* Gets the app parameters for the current URL.
* @param ignoreRoomAlias If true, does not try to parse a room alias from the URL