mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
Update default sync disconnect grace period to 10000ms in configuration and related functions
This commit is contained in:
@@ -100,7 +100,7 @@ export interface ConfigOptions {
|
|||||||
/**
|
/**
|
||||||
* Grace period in milliseconds to wait before reporting the sync loop as disconnected.
|
* Grace period in milliseconds to wait before reporting the sync loop as disconnected.
|
||||||
* This allows brief sync interruptions without triggering a reconnection message.
|
* This allows brief sync interruptions without triggering a reconnection message.
|
||||||
* Default is 60000ms (60 seconds). Set to 0 to disable the grace period.
|
* Default is 10000ms (10 seconds). Set to 0 to disable the grace period.
|
||||||
*/
|
*/
|
||||||
sync_disconnect_grace_period_ms?: number;
|
sync_disconnect_grace_period_ms?: number;
|
||||||
|
|
||||||
@@ -175,6 +175,6 @@ export const DEFAULT_CONFIG: ResolvedConfigOptions = {
|
|||||||
features: {
|
features: {
|
||||||
feature_use_device_session_member_events: true,
|
feature_use_device_session_member_events: true,
|
||||||
},
|
},
|
||||||
sync_disconnect_grace_period_ms: 60000,
|
sync_disconnect_grace_period_ms: 10000,
|
||||||
ssla: "https://static.element.io/legal/element-software-and-services-license-agreement-uk-1.pdf",
|
ssla: "https://static.element.io/legal/element-software-and-services-license-agreement-uk-1.pdf",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ import { E2eeType } from "../../e2ee/e2eeType";
|
|||||||
import { MatrixKeyProvider } from "../../e2ee/matrixKeyProvider";
|
import { MatrixKeyProvider } from "../../e2ee/matrixKeyProvider";
|
||||||
import { type MuteStates } from "../MuteStates";
|
import { type MuteStates } from "../MuteStates";
|
||||||
import { getUrlParams, HeaderStyle } from "../../UrlParams";
|
import { getUrlParams, HeaderStyle } from "../../UrlParams";
|
||||||
import { Config } from "../../config/Config";
|
|
||||||
import { type ProcessorState } from "../../livekit/TrackProcessorContext";
|
import { type ProcessorState } from "../../livekit/TrackProcessorContext";
|
||||||
import { ElementWidgetActions, widget } from "../../widget";
|
import { ElementWidgetActions, widget } from "../../widget";
|
||||||
import {
|
import {
|
||||||
@@ -537,7 +536,6 @@ export function createCallViewModel$(
|
|||||||
scope,
|
scope,
|
||||||
client,
|
client,
|
||||||
matrixRTCSession,
|
matrixRTCSession,
|
||||||
Config.get().sync_disconnect_grace_period_ms,
|
|
||||||
),
|
),
|
||||||
muteStates,
|
muteStates,
|
||||||
joinMatrixRTC: (transport: LivekitTransportConfig) => {
|
joinMatrixRTC: (transport: LivekitTransportConfig) => {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export interface HomeserverConnected {
|
|||||||
* @param client - The Matrix client to monitor sync state.
|
* @param client - The Matrix client to monitor sync state.
|
||||||
* @param matrixRTCSession - The RTC session to monitor membership.
|
* @param matrixRTCSession - The RTC session to monitor membership.
|
||||||
* @param gracePeriodMs - Grace period in milliseconds to wait before reporting sync disconnect.
|
* @param gracePeriodMs - Grace period in milliseconds to wait before reporting sync disconnect.
|
||||||
* If not provided, uses the config value (default 60000ms).
|
* If not provided, uses the config value (default 10000ms).
|
||||||
*/
|
*/
|
||||||
export function createHomeserverConnected$(
|
export function createHomeserverConnected$(
|
||||||
scope: ObservableScope,
|
scope: ObservableScope,
|
||||||
@@ -63,9 +63,9 @@ export function createHomeserverConnected$(
|
|||||||
Pick<MatrixRTCSession, "membershipStatus" | "probablyLeft">,
|
Pick<MatrixRTCSession, "membershipStatus" | "probablyLeft">,
|
||||||
gracePeriodMs?: number,
|
gracePeriodMs?: number,
|
||||||
): HomeserverConnected {
|
): HomeserverConnected {
|
||||||
// Get grace period from parameter or config (default 60000ms)
|
// Get grace period from parameter or config (default 10000ms)
|
||||||
const graceMs =
|
const graceMs =
|
||||||
gracePeriodMs ?? Config.get().sync_disconnect_grace_period_ms ?? 60000;
|
gracePeriodMs ?? Config.get().sync_disconnect_grace_period_ms ?? 10000;
|
||||||
|
|
||||||
const syncing$ = (
|
const syncing$ = (
|
||||||
fromEvent(client, ClientEvent.Sync) as Observable<[SyncState]>
|
fromEvent(client, ClientEvent.Sync) as Observable<[SyncState]>
|
||||||
|
|||||||
Reference in New Issue
Block a user