expose keep alive event configurarion in ec config and update defaults.

This commit is contained in:
Timo
2025-05-30 16:26:13 +02:00
parent a596eb71a9
commit 0567a8ad60
2 changed files with 14 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ export interface ConfigOptions {
api_key: string; api_key: string;
api_host: string; api_host: string;
}; };
/** /**
* The Sentry endpoint to which crash data will be sent. * The Sentry endpoint to which crash data will be sent.
* This is only used in the full package of Element Call. * This is only used in the full package of Element Call.
@@ -22,6 +23,7 @@ export interface ConfigOptions {
DSN: string; DSN: string;
environment: string; environment: string;
}; };
/** /**
* The rageshake server to which feedback and debug logs will be sent. * The rageshake server to which feedback and debug logs will be sent.
* This is only used in the full package of Element Call. * This is only used in the full package of Element Call.
@@ -66,6 +68,7 @@ export interface ConfigOptions {
* Allow to join group calls without audio and video. * Allow to join group calls without audio and video.
*/ */
feature_group_calls_without_video_and_audio?: boolean; feature_group_calls_without_video_and_audio?: boolean;
/** /**
* Send device-specific call session membership state events instead of * Send device-specific call session membership state events instead of
* legacy user-specific call membership state events. * legacy user-specific call membership state events.
@@ -86,6 +89,7 @@ export interface ConfigOptions {
* Defines whether participants should start with audio enabled by default. * Defines whether participants should start with audio enabled by default.
*/ */
enable_audio?: boolean; enable_audio?: boolean;
/** /**
* Defines whether participants should start with video enabled by default. * Defines whether participants should start with video enabled by default.
*/ */
@@ -121,7 +125,14 @@ export interface ConfigOptions {
* How long (in milliseconds) after the last keep-alive the server should expire the * How long (in milliseconds) after the last keep-alive the server should expire the
* MatrixRTC membership event. * MatrixRTC membership event.
*/ */
delayedLeaveEventDelayMs?: number;
/** @deprecated use delayedLeaveEventDelayMs instead */
membership_server_side_expiry_timeout?: number; membership_server_side_expiry_timeout?: number;
/**
* The interval (in milliseconds) in which the client will send membership keep-alives to the server.
*/
delayedLeaveEventRestartMs?: number;
}; };
} }

View File

@@ -121,7 +121,10 @@ export async function enterRTCSession(
...(useDeviceSessionMemberEvents !== undefined && { ...(useDeviceSessionMemberEvents !== undefined && {
useLegacyMemberEvents: !useDeviceSessionMemberEvents, useLegacyMemberEvents: !useDeviceSessionMemberEvents,
}), }),
delayedLeaveEventRestartMs:
matrixRtcSessionConfig?.delayedLeaveEventRestartMs,
delayedLeaveEventDelayMs: delayedLeaveEventDelayMs:
matrixRtcSessionConfig?.delayedLeaveEventDelayMs ??
matrixRtcSessionConfig?.membership_server_side_expiry_timeout, matrixRtcSessionConfig?.membership_server_side_expiry_timeout,
networkErrorRetryMs: matrixRtcSessionConfig?.membership_keep_alive_period, networkErrorRetryMs: matrixRtcSessionConfig?.membership_keep_alive_period,
makeKeyDelay: matrixRtcSessionConfig?.key_rotation_on_leave_delay, makeKeyDelay: matrixRtcSessionConfig?.key_rotation_on_leave_delay,