Add support for the via query param

This commit is contained in:
Robert Long
2021-11-17 15:22:27 -08:00
parent 442086f31b
commit 26dad81e06
2 changed files with 17 additions and 9 deletions

View File

@@ -47,8 +47,13 @@ async function initClient(clientOptions, guest) {
return client;
}
export async function fetchGroupCall(client, roomIdOrAlias, timeout = 5000) {
const { roomId } = await client.joinRoom(roomIdOrAlias);
export async function fetchGroupCall(
client,
roomIdOrAlias,
viaServers = undefined,
timeout = 5000
) {
const { roomId } = await client.joinRoom(roomIdOrAlias, { viaServers });
return new Promise((resolve, reject) => {
let timeoutId;