This commit is contained in:
fkwp
2026-05-04 20:51:16 +02:00
parent c393aa414e
commit 00ae106e8a
2 changed files with 6 additions and 6 deletions

View File

@@ -209,9 +209,7 @@ async function getLiveKitJWT(
};
}
const makeRequest = async (
delayParts: IDelayParams,
): Promise<Response> => {
const makeRequest = async (delayParts: IDelayParams): Promise<Response> => {
return await fetch(livekitServiceURL + "/sfu/get", {
method: "POST",
headers: {
@@ -219,7 +217,7 @@ async function getLiveKitJWT(
},
body: JSON.stringify({
// The legacy jwt endpoint uses only the matrix room id to calculate the livekit room alias.
// In turn, the livekit room alias is provided as part f the JWT payload.
// In turn, the livekit room alias is provided as part of the JWT payload.
room: matrixRoomId,
openid_token: openIDToken,
device_id: deviceId,

View File

@@ -783,12 +783,14 @@ export function enterRTCSession(
// - A delayed leave event is emitted (configured with a `leaveDelay` ms period).
// Note: Use leaveDelay >> gracePeriod for delegated leave events.
const gracePeriod = Config.get().sync_disconnect_grace_period_ms ?? 10000;
const leaveDelay = matrixRtcSessionConfig?.delayed_leave_event_delay_ms ?? 10000;
const leaveDelay =
matrixRtcSessionConfig?.delayed_leave_event_delay_ms ?? 10000;
const retryInterval = matrixRtcSessionConfig?.network_error_retry_ms ?? 1000;
// Math.min is used to account for the respective worst case: /sync not available or leave event emitted.
const maxWaitTime = Math.min(gracePeriod, leaveDelay);
const maximumNetworkErrorRetryCount = Math.ceil(maxWaitTime / retryInterval) + 1;
const maximumNetworkErrorRetryCount =
Math.ceil(maxWaitTime / retryInterval) + 1;
// Multi-sfu does not need a preferred foci list. just the focus that is actually used.
// TODO where/how do we track errors originating from the ongoing rtcSession?