diff --git a/docs/url_params.md b/docs/url_params.md index 789e3f3ce..8263055c5 100644 --- a/docs/url_params.md +++ b/docs/url_params.md @@ -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. | | `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.) | -| `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. | | `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. | diff --git a/sdk/README.md b/sdk/README.md index 7102ba29c..83a04f2e9 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -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: ``` -/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 @@ -42,7 +42,6 @@ by the matrixRTCSdk to start the postmessage widget api (communication between t ``` widgetId = $matrix_widget_id -perParticipantE2EE = true userId = $matrix_user_id deviceId = $org.matrix.msc3819.matrix_device_id baseUrl = $org.matrix.msc4039.matrix_base_url @@ -53,7 +52,7 @@ baseUrl = $org.matrix.msc4039.matrix_base_url Full template use as ``: ``` -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`) diff --git a/src/UrlConfiguration.ts b/src/UrlConfiguration.ts index 6de204bb9..2840bad1a 100644 --- a/src/UrlConfiguration.ts +++ b/src/UrlConfiguration.ts @@ -86,11 +86,6 @@ export interface UrlConfiguration { * user's homeserver doesn't provide any. */ 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, * 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, hideScreensharing: false, allowIceFallback: true, - perParticipantE2EE: true, controlledAudioDevices: platform === "desktop" ? false : true, skipLobby: true, returnToLobby: false, @@ -229,7 +223,6 @@ export function configurationForIntent(intent: UserIntent): UrlConfiguration { showControls: true, hideScreensharing: false, allowIceFallback: false, - perParticipantE2EE: false, controlledAudioDevices: false, skipLobby: false, returnToLobby: false, diff --git a/src/UrlParams.test.ts b/src/UrlParams.test.ts index 65be8ae85..c1f1aeeb0 100644 --- a/src/UrlParams.test.ts +++ b/src/UrlParams.test.ts @@ -230,7 +230,6 @@ describe("UrlParams", () => { showControls: true, hideScreensharing: false, allowIceFallback: false, - perParticipantE2EE: false, controlledAudioDevices: false, skipLobby: false, returnToLobby: false, @@ -243,7 +242,6 @@ describe("UrlParams", () => { showControls: true, hideScreensharing: false, allowIceFallback: true, - perParticipantE2EE: true, controlledAudioDevices: platform === "desktop" ? false : true, skipLobby: true, returnToLobby: false, @@ -256,7 +254,6 @@ describe("UrlParams", () => { showControls: true, hideScreensharing: false, allowIceFallback: true, - perParticipantE2EE: true, controlledAudioDevices: platform === "desktop" ? false : true, skipLobby: false, returnToLobby: false, @@ -499,7 +496,6 @@ describe("UrlParams", () => { // A host owns navigation, so Element Call must not offer a way out of // the room confineToRoom: true, - perParticipantE2EE: true, // The lobby first, so that the user picks their devices rather than // being thrown into the call by the act of being rendered skipLobby: false, @@ -512,7 +508,6 @@ describe("UrlParams", () => { expect(configurationForIntent(UserIntent.Unknown)).toMatchObject({ confineToRoom: false, header: HeaderStyle.Standard, - perParticipantE2EE: false, }); }); }); diff --git a/src/UrlParams.ts b/src/UrlParams.ts index 120d57533..c3b4229de 100644 --- a/src/UrlParams.ts +++ b/src/UrlParams.ts @@ -350,7 +350,6 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => { showControls: parser.getFlag("showControls"), hideScreensharing: parser.getFlag("hideScreensharing"), allowIceFallback: parser.getFlag("allowIceFallback"), - perParticipantE2EE: parser.getFlag("perParticipantE2EE"), controlledAudioDevices: parser.getFlag("controlledAudioDevices"), skipLobby: isWidget ? parser.getFlag("skipLobby") : false, // 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(); // 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 - switch (encryptionSystem?.kind) { - case E2eeType.SHARED_KEY: { - const encodedPassword = encodeURIComponent(encryptionSystem.secret); - if (encodedPassword !== encryptionSystem.secret) { - logger.info( - "Encoded call password used non URL-safe chars: buggy client?", - ); - } - params.set("password", encodedPassword); - break; + if (encryptionSystem?.kind === E2eeType.SHARED_KEY) { + const encodedPassword = encodeURIComponent(encryptionSystem.secret); + if (encodedPassword !== encryptionSystem.secret) { + logger.info( + "Encoded call password used non URL-safe chars: buggy client?", + ); } - case E2eeType.PER_PARTICIPANT: - params.set("perParticipantE2EE", "true"); - break; + params.set("password", encodedPassword); } params.set("roomId", roomId); viaServers?.forEach((s) => params.set("viaServers", s)); diff --git a/src/room/CallView.tsx b/src/room/CallView.tsx index 3c34dc845..5e0471b74 100644 --- a/src/room/CallView.tsx +++ b/src/room/CallView.tsx @@ -242,12 +242,7 @@ const LoadedCallView: FC = ({ const { displayName, avatarUrl } = useProfile(client); const roomName = useRoomName(room); const roomAvatar = useRoomAvatar(room); - const { - perParticipantE2EE, - returnToLobby, - password: passwordFromUrl, - header, - } = useUrlParams(); + const { returnToLobby, password: passwordFromUrl, header } = useUrlParams(); const e2eeSystem = useRoomEncryptionSystem(room.roomId); // Save the password once we start the groupCallView @@ -365,7 +360,6 @@ const LoadedCallView: FC = ({ rtcSession, preload, skipLobby, - perParticipantE2EE, mediaDevices, latestMuteStates, setJoined,