Add option to allow ICE server fallback
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
b8af9a0733
commit
cef88e2894
3 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
# Used for determining the homeserver to use for short urls etc.
|
# Used for determining the homeserver to use for short urls etc.
|
||||||
# VITE_DEFAULT_HOMESERVER=http://localhost:8008
|
# VITE_DEFAULT_HOMESERVER=http://localhost:8008
|
||||||
|
# VITE_FALLBACK_ICE_ALLOWED=true
|
||||||
|
|
||||||
# Used for submitting debug logs to an external rageshake server
|
# Used for submitting debug logs to an external rageshake server
|
||||||
# VITE_RAGESHAKE_SUBMIT_URL=http://localhost:9110/api/submit
|
# VITE_RAGESHAKE_SUBMIT_URL=http://localhost:9110/api/submit
|
||||||
|
|
|
@ -34,6 +34,7 @@ import {
|
||||||
initClient,
|
initClient,
|
||||||
defaultHomeserver,
|
defaultHomeserver,
|
||||||
CryptoStoreIntegrityError,
|
CryptoStoreIntegrityError,
|
||||||
|
fallbackICEServerAllowed,
|
||||||
} from "./matrix-utils";
|
} from "./matrix-utils";
|
||||||
import { widget } from "./widget";
|
import { widget } from "./widget";
|
||||||
import { translatedError } from "./TranslatedError";
|
import { translatedError } from "./TranslatedError";
|
||||||
|
@ -130,6 +131,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||||
accessToken: access_token,
|
accessToken: access_token,
|
||||||
userId: user_id,
|
userId: user_id,
|
||||||
deviceId: device_id,
|
deviceId: device_id,
|
||||||
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
|
@ -145,6 +147,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||||
accessToken: access_token,
|
accessToken: access_token,
|
||||||
userId: user_id,
|
userId: user_id,
|
||||||
deviceId: device_id,
|
deviceId: device_id,
|
||||||
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
},
|
},
|
||||||
false // Don't need the crypto store just to log out
|
false // Don't need the crypto store just to log out
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,6 +24,8 @@ import { getUrlParams } from "./UrlParams";
|
||||||
export const defaultHomeserver =
|
export const defaultHomeserver =
|
||||||
(import.meta.env.VITE_DEFAULT_HOMESERVER as string) ??
|
(import.meta.env.VITE_DEFAULT_HOMESERVER as string) ??
|
||||||
`${window.location.protocol}//${window.location.host}`;
|
`${window.location.protocol}//${window.location.host}`;
|
||||||
|
export const fallbackICEServerAllowed =
|
||||||
|
import.meta.env.VITE_FALLBACK_ICE_ALLOWED === "true";
|
||||||
|
|
||||||
export const defaultHomeserverHost = new URL(defaultHomeserver).host;
|
export const defaultHomeserverHost = new URL(defaultHomeserver).host;
|
||||||
|
|
||||||
|
@ -152,6 +154,7 @@ export async function initClient(
|
||||||
// so we don't want API calls taking ages, we'd rather they just fail.
|
// so we don't want API calls taking ages, we'd rather they just fail.
|
||||||
localTimeoutMs: 5000,
|
localTimeoutMs: 5000,
|
||||||
useE2eForGroupCall: e2eEnabled,
|
useE2eForGroupCall: e2eEnabled,
|
||||||
|
fallbackICEServerAllowed: fallbackICEServerAllowed,
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue