Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/url-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ These parameters are relevant to both [widget](./embedded-standalone.md) and [st
| `sendNotificationType` | `ring` or `notification` | No | No | Will send a "ring" or "notification" `m.rtc.notification` event if the user is the first one in the call. |
| `autoLeaveWhenOthersLeft` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Whether the app should automatically leave the call when there is no one left in the call. |
| `waitForCallPickup` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | When sending a notification, show UI that the app is awaiting an answer, play a dial tone, and (in widget mode) auto-close the widget once the notification expires. |
| `preferStickyEvents` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Enables using sticky events to derive call membership. |

### Widget-only parameters

Expand Down
6 changes: 6 additions & 0 deletions src/UrlParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ export interface UrlProperties {
* can be "light", "dark", "light-high-contrast" or "dark-high-contrast".
*/
theme: string | null;
/**
* Whether or not the call should be held using the sticky event implementation,
* where possible.
*/
preferStickyEvents: boolean;
}

/**
Expand Down Expand Up @@ -501,6 +506,7 @@ export const computeUrlParams = (search = "", hash = ""): UrlParams => {
sentryDsn: parser.getParam("sentryDsn"),
sentryEnvironment: parser.getParam("sentryEnvironment"),
e2eEnabled: parser.getFlagParam("enableE2EE", true),
preferStickyEvents: parser.getFlagParam("preferStickyEvents", false),
};

const configuration: Partial<UrlConfiguration> = {
Expand Down
4 changes: 3 additions & 1 deletion src/state/CallViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,9 @@ export class CallViewModel {
await enterRTCSession(this.matrixRTCSession, advertised.transport, {
encryptMedia: this.options.encryptionSystem.kind !== E2eeType.NONE,
useMultiSfu: advertised.multiSfu,
preferStickyEvents: advertised.preferStickyEvents,
preferStickyEvents:
this.urlParams.preferStickyEvents &&
advertised.preferStickyEvents,
});
} catch (e) {
logger.error("Error entering RTC session", e);
Expand Down