Remove perParticipantE2EE

This commit is contained in:
Johannes Marbach
2026-10-08 17:15:19 +02:00
parent 471c76c0e7
commit a9fa48f68c
6 changed files with 10 additions and 37 deletions
-1
View File
@@ -61,7 +61,6 @@ These parameters are relevant to both [widget](./embedded_standalone.md) and [st
| `homeserver` | | Not applicable | No | Homeserver for registering a new (guest) user, configures non-default guest user server when creating a spa link. | | `homeserver` | | Not applicable | No | Homeserver for registering a new (guest) user, configures non-default guest user server when creating a spa link. |
| `lang` | [BCP 47](https://www.rfc-editor.org/info/bcp47) code | No | No | The language the app should use. | | `lang` | [BCP 47](https://www.rfc-editor.org/info/bcp47) code | No | No | The language the app should use. |
| `password` | | No | No | E2EE password when using a shared secret. (For individual sender keys in embedded mode this is not required.) | | `password` | | No | No | E2EE password when using a shared secret. (For individual sender keys in embedded mode this is not required.) |
| `perParticipantE2EE` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Enables per participant encryption with Keys exchanged over encrypted matrix room messages. |
| `controlledAudioDevices` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Whether the [global JS controls for audio devices](./controls.md#audio-devices) should be enabled, allowing the list of audio devices to be controlled by the app hosting Element Call. | | `controlledAudioDevices` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Whether the [global JS controls for audio devices](./controls.md#audio-devices) should be enabled, allowing the list of audio devices to be controlled by the app hosting Element Call. |
| `roomId` | [Matrix Room ID](https://spec.matrix.org/v1.12/appendices/#room-ids) | Yes | No | Anything about what room we're pointed to should be from useRoomIdentifier which parses the path and resolves alias with respect to the default server name, however roomId is an exception as we need the room ID in embedded widget mode, and not the room alias (or even the via params because we are not trying to join it). This is also not validated, where it is in `useRoomIdentifier()`. | | `roomId` | [Matrix Room ID](https://spec.matrix.org/v1.12/appendices/#room-ids) | Yes | No | Anything about what room we're pointed to should be from useRoomIdentifier which parses the path and resolves alias with respect to the default server name, however roomId is an exception as we need the room ID in embedded widget mode, and not the room alias (or even the via params because we are not trying to join it). This is also not validated, where it is in `useRoomIdentifier()`. |
| `showControls` | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Displays controls like mute, screen-share, invite, and hangup buttons during a call. | | `showControls` | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Displays controls like mute, screen-share, invite, and hangup buttons during a call. |
+2 -3
View File
@@ -26,7 +26,7 @@ This file needs to be hosted. Locally (via `npx serve -l 81234 --cors`) or on a
Now you just need to add the widget to element web via: Now you just need to add the widget to element web via:
``` ```
/addwidget http://localhost:3000?widgetId=$matrix_widget_id&perParticipantE2EE=true&userId=$matrix_user_id&deviceId=$org.matrix.msc3819.matrix_device_id&baseUrl=$org.matrix.msc4039.matrix_base_url&roomId=$matrix_room_id /addwidget http://localhost:3000?widgetId=$matrix_widget_id&userId=$matrix_user_id&deviceId=$org.matrix.msc3819.matrix_device_id&baseUrl=$org.matrix.msc4039.matrix_base_url&roomId=$matrix_room_id
``` ```
## Widgets ## Widgets
@@ -42,7 +42,6 @@ by the matrixRTCSdk to start the postmessage widget api (communication between t
``` ```
widgetId = $matrix_widget_id widgetId = $matrix_widget_id
perParticipantE2EE = true
userId = $matrix_user_id userId = $matrix_user_id
deviceId = $org.matrix.msc3819.matrix_device_id deviceId = $org.matrix.msc3819.matrix_device_id
baseUrl = $org.matrix.msc4039.matrix_base_url baseUrl = $org.matrix.msc4039.matrix_base_url
@@ -53,7 +52,7 @@ baseUrl = $org.matrix.msc4039.matrix_base_url
Full template use as `<widgetUrl>`: Full template use as `<widgetUrl>`:
``` ```
http://localhost:3000?widgetId=$matrix_widget_id&perParticipantE2EE=true&userId=$matrix_user_id&deviceId=$org.matrix.msc3819.matrix_device_id&baseUrl=$org.matrix.msc4039.matrix_base_url&roomId=$matrix_room_id http://localhost:3000?widgetId=$matrix_widget_id&userId=$matrix_user_id&deviceId=$org.matrix.msc3819.matrix_device_id&baseUrl=$org.matrix.msc4039.matrix_base_url&roomId=$matrix_room_id
``` ```
the `$` prefixed variables will be replaced by EW on widget instantiation. (e.g. `$matrix_user_id` -> `@user:example.com` (url encoding will also be applied automatically by EW) -> `%40user%3Aexample.com`) the `$` prefixed variables will be replaced by EW on widget instantiation. (e.g. `$matrix_user_id` -> `@user:example.com` (url encoding will also be applied automatically by EW) -> `%40user%3Aexample.com`)
-7
View File
@@ -86,11 +86,6 @@ export interface UrlConfiguration {
* user's homeserver doesn't provide any. * user's homeserver doesn't provide any.
*/ */
allowIceFallback: boolean; allowIceFallback: boolean;
/**
* Whether the app should use per participant keys for E2EE.
*/
perParticipantE2EE: boolean;
/** /**
* Whether the global JS controls for audio output devices should be enabled, * Whether the global JS controls for audio output devices should be enabled,
* allowing the list of output devices to be controlled by the app hosting * allowing the list of output devices to be controlled by the app hosting
@@ -174,7 +169,6 @@ export function configurationForIntent(intent: UserIntent): UrlConfiguration {
showControls: true, showControls: true,
hideScreensharing: false, hideScreensharing: false,
allowIceFallback: true, allowIceFallback: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true, controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true, skipLobby: true,
returnToLobby: false, returnToLobby: false,
@@ -229,7 +223,6 @@ export function configurationForIntent(intent: UserIntent): UrlConfiguration {
showControls: true, showControls: true,
hideScreensharing: false, hideScreensharing: false,
allowIceFallback: false, allowIceFallback: false,
perParticipantE2EE: false,
controlledAudioDevices: false, controlledAudioDevices: false,
skipLobby: false, skipLobby: false,
returnToLobby: false, returnToLobby: false,
-5
View File
@@ -230,7 +230,6 @@ describe("UrlParams", () => {
showControls: true, showControls: true,
hideScreensharing: false, hideScreensharing: false,
allowIceFallback: false, allowIceFallback: false,
perParticipantE2EE: false,
controlledAudioDevices: false, controlledAudioDevices: false,
skipLobby: false, skipLobby: false,
returnToLobby: false, returnToLobby: false,
@@ -243,7 +242,6 @@ describe("UrlParams", () => {
showControls: true, showControls: true,
hideScreensharing: false, hideScreensharing: false,
allowIceFallback: true, allowIceFallback: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true, controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: true, skipLobby: true,
returnToLobby: false, returnToLobby: false,
@@ -256,7 +254,6 @@ describe("UrlParams", () => {
showControls: true, showControls: true,
hideScreensharing: false, hideScreensharing: false,
allowIceFallback: true, allowIceFallback: true,
perParticipantE2EE: true,
controlledAudioDevices: platform === "desktop" ? false : true, controlledAudioDevices: platform === "desktop" ? false : true,
skipLobby: false, skipLobby: false,
returnToLobby: false, returnToLobby: false,
@@ -499,7 +496,6 @@ describe("UrlParams", () => {
// A host owns navigation, so Element Call must not offer a way out of // A host owns navigation, so Element Call must not offer a way out of
// the room // the room
confineToRoom: true, confineToRoom: true,
perParticipantE2EE: true,
// The lobby first, so that the user picks their devices rather than // The lobby first, so that the user picks their devices rather than
// being thrown into the call by the act of being rendered // being thrown into the call by the act of being rendered
skipLobby: false, skipLobby: false,
@@ -512,7 +508,6 @@ describe("UrlParams", () => {
expect(configurationForIntent(UserIntent.Unknown)).toMatchObject({ expect(configurationForIntent(UserIntent.Unknown)).toMatchObject({
confineToRoom: false, confineToRoom: false,
header: HeaderStyle.Standard, header: HeaderStyle.Standard,
perParticipantE2EE: false,
}); });
}); });
}); });
+7 -14
View File
@@ -350,7 +350,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
showControls: parser.getFlag("showControls"), showControls: parser.getFlag("showControls"),
hideScreensharing: parser.getFlag("hideScreensharing"), hideScreensharing: parser.getFlag("hideScreensharing"),
allowIceFallback: parser.getFlag("allowIceFallback"), allowIceFallback: parser.getFlag("allowIceFallback"),
perParticipantE2EE: parser.getFlag("perParticipantE2EE"),
controlledAudioDevices: parser.getFlag("controlledAudioDevices"), controlledAudioDevices: parser.getFlag("controlledAudioDevices"),
skipLobby: isWidget ? parser.getFlag("skipLobby") : false, skipLobby: isWidget ? parser.getFlag("skipLobby") : false,
// In SPA mode the user should always exit to the home screen when hanging // In SPA mode the user should always exit to the home screen when hanging
@@ -501,20 +500,14 @@ export function generateUrlSearchParams(
const params = new URLSearchParams(); const params = new URLSearchParams();
// The password shouldn't need URL encoding here (we generate URL-safe ones) but encode // The password shouldn't need URL encoding here (we generate URL-safe ones) but encode
// it in case it came from another client that generated a non url-safe one // it in case it came from another client that generated a non url-safe one
switch (encryptionSystem?.kind) { if (encryptionSystem?.kind === E2eeType.SHARED_KEY) {
case E2eeType.SHARED_KEY: { const encodedPassword = encodeURIComponent(encryptionSystem.secret);
const encodedPassword = encodeURIComponent(encryptionSystem.secret); if (encodedPassword !== encryptionSystem.secret) {
if (encodedPassword !== encryptionSystem.secret) { logger.info(
logger.info( "Encoded call password used non URL-safe chars: buggy client?",
"Encoded call password used non URL-safe chars: buggy client?", );
);
}
params.set("password", encodedPassword);
break;
} }
case E2eeType.PER_PARTICIPANT: params.set("password", encodedPassword);
params.set("perParticipantE2EE", "true");
break;
} }
params.set("roomId", roomId); params.set("roomId", roomId);
viaServers?.forEach((s) => params.set("viaServers", s)); viaServers?.forEach((s) => params.set("viaServers", s));
+1 -7
View File
@@ -242,12 +242,7 @@ const LoadedCallView: FC<LoadedProps> = ({
const { displayName, avatarUrl } = useProfile(client); const { displayName, avatarUrl } = useProfile(client);
const roomName = useRoomName(room); const roomName = useRoomName(room);
const roomAvatar = useRoomAvatar(room); const roomAvatar = useRoomAvatar(room);
const { const { returnToLobby, password: passwordFromUrl, header } = useUrlParams();
perParticipantE2EE,
returnToLobby,
password: passwordFromUrl,
header,
} = useUrlParams();
const e2eeSystem = useRoomEncryptionSystem(room.roomId); const e2eeSystem = useRoomEncryptionSystem(room.roomId);
// Save the password once we start the groupCallView // Save the password once we start the groupCallView
@@ -365,7 +360,6 @@ const LoadedCallView: FC<LoadedProps> = ({
rtcSession, rtcSession,
preload, preload,
skipLobby, skipLobby,
perParticipantE2EE,
mediaDevices, mediaDevices,
latestMuteStates, latestMuteStates,
setJoined, setJoined,