mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-07 10:14:36 +00:00
prettier
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user