mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Add config to send session membership state events (#2460)
If not set, legacy call membership state events are sent instead. Even if set, legacy events are sent in rooms with active legacy calls. --------- Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
This commit is contained in:
parent
ca45067158
commit
34c7d02de2
@ -65,11 +65,21 @@ export interface ConfigOptions {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow to join a group calls without audio and video.
|
* TEMPORARY experimental features.
|
||||||
* TEMPORARY: Is a feature that's not proved and experimental
|
|
||||||
*/
|
*/
|
||||||
features?: {
|
features?: {
|
||||||
feature_group_calls_without_video_and_audio: boolean;
|
/**
|
||||||
|
* Allow to join group calls without audio and video.
|
||||||
|
*/
|
||||||
|
feature_group_calls_without_video_and_audio?: boolean;
|
||||||
|
/**
|
||||||
|
* Send device-specific call session membership state events instead of
|
||||||
|
* legacy user-specific call membership state events.
|
||||||
|
* This setting has no effect when the user joins an active call with
|
||||||
|
* legacy state events. For compatibility, Element Call will always join
|
||||||
|
* active legacy calls with legacy state events.
|
||||||
|
*/
|
||||||
|
feature_use_device_session_member_events?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,10 +108,17 @@ export async function enterRTCSession(
|
|||||||
|
|
||||||
// right now we assume everything is a room-scoped call
|
// right now we assume everything is a room-scoped call
|
||||||
const livekitAlias = rtcSession.room.roomId;
|
const livekitAlias = rtcSession.room.roomId;
|
||||||
|
const useDeviceSessionMemberEvents =
|
||||||
|
Config.get().features?.feature_use_device_session_member_events;
|
||||||
rtcSession.joinRoomSession(
|
rtcSession.joinRoomSession(
|
||||||
await makePreferredLivekitFoci(rtcSession, livekitAlias),
|
await makePreferredLivekitFoci(rtcSession, livekitAlias),
|
||||||
makeActiveFocus(),
|
makeActiveFocus(),
|
||||||
{ manageMediaKeys: encryptMedia },
|
{
|
||||||
|
manageMediaKeys: encryptMedia,
|
||||||
|
...(useDeviceSessionMemberEvents !== undefined && {
|
||||||
|
useLegacyMemberEvents: !useDeviceSessionMemberEvents,
|
||||||
|
}),
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user