Compare commits

...
Author SHA1 Message Date
Timo K.andClaude Opus 5.5 d49f4640f7 Fix typos in code comments
The fixes this branch originally carried (sdk/README.md port,
src/livekit/openIDSFU.ts comments) no longer apply: the README section was
rewritten and openIDSFU.ts moved to sdk/src/media-backend/livekit/auth/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:25:30 +01:00
Timo 42bd2fc2d4 Merge pull request #4548 from element-hq/toger5/ew-component-netlify
Deploy Element Web with the Element Call component to Netlify
2026-12-03 16:47:05 +01:00
Timo K. 21b3ebbd19 only allow one EW build 2026-12-03 16:38:42 +01:00
Johannes Marbach f73339199c Merge pull request #4559 from element-hq/johannes/turns
Bump Claude turn limit
2026-12-03 16:16:46 +01:00
Johannes Marbach 9ba6a31996 Bump Claude turn limit 2026-12-03 15:50:50 +01:00
Robin 0691a09dc5 Merge pull request #4541 from element-hq/robin/new-footer
New footer design
2026-12-03 09:47:54 -05:00
Johannes Marbach 090ff55b4a Merge pull request #4556 from element-hq/johannes/prs
Stop depending on pull_request_target
2026-12-03 15:33:18 +01:00
Timo e4f816b1fc Merge pull request #4546 from element-hq/florianduros/default-audio-video-disabled
Add a video room intent
2026-12-03 15:30:06 +01:00
Johannes Marbach 068d968aab Stop depending on pull_request_target 2026-12-03 15:18:21 +01:00
Florian Duros 90b48be6b4 Merge branch 'main' into florianduros/default-audio-video-disabled 2026-12-03 14:13:48 +01:00
Florian Duros 8e8886b250 Rename startAudioMuted and startVideoMuted
Rename the two attributes to initialVideoEnabled and initialAudioEnabled
2026-12-03 11:47:25 +01:00
Johannes Marbach 965e77be36 Merge pull request #4555 from element-hq/renovate/element-web
Update ghcr.io/element-hq/element-web:develop Docker digest to a9fba6e
2026-12-03 08:39:00 +01:00
renovate[bot] 3818c34c3b Update ghcr.io/element-hq/element-web:develop Docker digest to a9fba6e 2026-12-03 03:18:47 +00:00
Robin b7374c4906 Merge pull request #4553 from element-hq/renovate/compound
Update dependency @vector-im/compound-web to v10.7.0
2026-12-02 17:09:20 -05:00
Robin 2100b93f5b Exclude our own packages from Renovate's minimum release age policy 2026-12-02 16:59:09 -05:00
renovate[bot] a62d3f4dd9 Update dependency @vector-im/compound-web to v10.7.0 2026-12-02 21:55:07 +00:00
Florian Duros 1b544b0734 Declare a video room intent 2026-12-02 18:16:56 +01:00
Timo K. 6e791c3e85 split out EW build into its own workflow (dont block full on ew) 2026-12-02 16:26:54 +01:00
Timo K. 2223586408 Deploy Element Web with the Element Call component to Netlify
Element Web develop branch, with this commit's component in place of the
npm release and `feature_element_call_react` forced on.
When: built by the Build workflow on every push to main and every PR
update.
Deploy: element-web--element-call.netlify.app on each push to main,
pr<N>-element-web--element-call.netlify.app on each same-repo PR update.
Element Web develop changing alone redeploys nothing.
2026-12-02 15:39:54 +01:00
Florian Duros 96700aea6c Start with the microphone or camera off when the host asks
The host's request only ever turns a device off, so it can't undo the muting that skipping the lobby implies.
2026-12-02 12:17:49 +01:00
Florian Duros 77c7cdd174 Add startAudioMuted and startVideoMuted URL parameters
Let a host ask for the microphone or the camera to start off.
2026-12-02 12:17:49 +01:00
18 changed files with 326 additions and 92 deletions
+2 -10
View File
@@ -1,22 +1,14 @@
name: Prevent blocked
on:
# zizmor: ignore[dangerous-triggers]
# Reason: This workflow does not checkout code or use secrets.
# It only reads labels to set a failure status on the PR.
pull_request_target:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
permissions:
pull-requests: read
# Required to fail the check on the PR
statuses: write
permissions: {}
jobs:
prevent-blocked:
name: Prevent blocked
runs-on: ubuntu-24.04
permissions:
pull-requests: read
steps:
- name: Add notice
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
+12 -2
View File
@@ -7,7 +7,7 @@ on:
type: string
package:
type: string # This would ideally be a `choice` type, but that isn't supported yet
description: The package type to be built. Must be one of 'full', 'embedded', or 'widget-rtc-sdk'
description: The package type to be built. Must be one of 'full', 'embedded', 'widget-rtc-sdk' or 'component'
required: true
build_mode:
type: string # This would ideally be a `choice` type, but that isn't supported yet
@@ -59,11 +59,21 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=4096"
PACKAGE: ${{ inputs.package }}
BUILD_MODE: ${{ inputs.build_mode }}
- name: Pack component
# A tarball a host installs like the npm release. Stripped as in
# publish-component.yaml, so the install does not run `prepare` and
# rebuild it.
if: inputs.package == 'component'
working-directory: component
run: |
jq 'del(.devEngines, .scripts)' package.json > package.json.tmp && mv package.json.tmp package.json
mkdir -p ../component-pack
npm pack --pack-destination ../component-pack
- name: Upload Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: build-output-${{ inputs.package }}
path: dist
path: ${{ inputs.package == 'component' && 'component-pack' || 'dist' }}
if-no-files-found: error
# We'll only use this in a triggered job, then we're done with it
retention-days: 1
+113
View File
@@ -0,0 +1,113 @@
# Element Web develop with this commit's component in place of the npm release
# it pins, and the component embedding forced on. Deployed to
# element-web--element-call.netlify.app by deploy_element_web_with_ec_component
# for main, and to pr<N>-element-web--element-call.netlify.app by pr-deploy.yaml.
#
# A workflow of its own rather than part of Build: pr-deploy.yaml runs once per
# finished workflow, so the Element Call previews do not wait for this slower
# build, and a broken Element Web develop does not hold them back.
name: Build Element Web
on:
pull_request:
types:
- synchronize
- opened
- labeled
push:
branches: [main]
permissions: {}
# A newer push to a PR cancels its running build. A label event that builds
# nothing gets a group of its own: concurrency applies before the jobs' `if`,
# so in the PR's group it would cancel a real build and then skip.
concurrency:
group: ${{ github.workflow }}-${{ (github.event.action == 'labeled' && github.event.label.name != 'development build') && github.run_id || github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build_component_element_call:
# The React component package, as a tarball for build_element_web_with_ec_component
# Of the labels only `development build` changes the build
if: github.event.action != 'labeled' || github.event.label.name == 'development build'
permissions:
contents: read
uses: $/.github/workflows/build-element-call.yaml
with:
package: component
vite_app_version: ${{ github.sha }}
build_mode: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'development build') && 'development' || 'production' }}
secrets:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build_element_web_with_ec_component:
# The steps follow the prepare job of Element Web's build-and-test.yaml.
name: Build Element Web with the Element Call component
needs: build_component_element_call
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout Element Web
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
repository: element-hq/element-web
ref: develop
persist-credentials: false
# Also installs the Node of Element Web's .node-version
- uses: pnpm/setup@731dfb6463bbd11c11fd0ee11fe00ed0e36d48a1 # v3.2.0
with:
cache: true
save-cache: false
install: false
- name: Fetch layered build
id: layered
run: |
./scripts/layered.sh
VERSION=$(scripts/get-version-from-git.sh)
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Download the component
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build-output-component
path: ec-component
- name: Install the component
# The same tarball install Element Web's layered.sh does for matrix-js-sdk
run: pnpm -C apps/web install "$PWD"/ec-component/*.tgz
- name: Write config
# The setting prefers the config's value, so this forces it on
working-directory: apps/web
run: jq '.features.feature_element_call_react = true' element.io/develop/config.json > config.json
- name: Build
env:
CI_PACKAGE: true
VERSION: ${{ steps.layered.outputs.version }}
working-directory: apps/web
run: pnpm run build
- name: Upload Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: build-output-element-web-with-ec-component
path: apps/web/webapp
if-no-files-found: error
# We'll only use this in a deploy job, then we're done with it
retention-days: 1
deploy_element_web_with_ec_component:
# PRs are deployed by pr-deploy.yaml, which keeps the secrets away from PR code
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build_element_web_with_ec_component
permissions:
deployments: write
uses: $/.github/workflows/deploy-to-netlify.yaml
with:
package: element-web-with-ec-component
deployment_ref: ${{ github.sha }}
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
+2 -7
View File
@@ -1,15 +1,10 @@
name: PR changelog label
on:
# zizmor: ignore[dangerous-triggers]
# This is safe because we do not use actions/checkout or execute untrusted code.
# Using pull_request_target is necessary to allow status writes for PRs from forks.
pull_request_target:
pull_request:
types: [labeled, unlabeled, opened, synchronize]
permissions:
pull-requests: read
statuses: write
permissions: {}
jobs:
pr-changelog-label:
+4 -1
View File
@@ -14,6 +14,8 @@ jobs:
# Only run on labelling and skip forks.
if: github.event.label.name == 'Claude-Review' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-24.04
# The turn limit below is generous, so bound the job by time instead.
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
@@ -98,7 +100,8 @@ jobs:
Use Markdown links for anything that can be navigated to on GitHub such
as files, commits, issues, pull requests, workflow runs, etc.
# Set a generous turn limit. It's bounded by timeout-minutes above.
claude_args: |
--model claude-fable-5-1
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(git log:*),Bash(git diff:*),Bash(git show:*)"
--max-turns 50
--max-turns 150
+14 -8
View File
@@ -2,14 +2,17 @@ name: Deploy to Netlify
on:
workflow_call:
inputs:
# Optional so that main can deploy element-web-with-ec-component,
# which then uses the alias `element-web`. Every other package needs
# pr_number (for its alias) and full needs pr_head_* (for its config).
pr_number:
required: true
required: false
type: string
pr_head_full_name:
required: true
required: false
type: string
pr_head_ref:
required: true
required: false
type: string
deployment_ref:
required: true
@@ -17,7 +20,7 @@ on:
package:
required: true
type: string
description: Which package to deploy - 'full', 'embedded', 'widget-rtc-sdk', or 'storybook'
description: Which package to deploy - 'full', 'embedded', 'widget-rtc-sdk', 'storybook' or 'element-web-with-ec-component'
artifact_run_id:
required: false
type: string
@@ -59,8 +62,9 @@ jobs:
- name: Add redirects file
# We fetch from github directly as we don't bother checking out the repo
# Not needed for storybook deployments
if: inputs.package != 'storybook'
# Not needed for storybook deployments, nor for Element Web, which
# routes with the URL fragment
if: inputs.package != 'storybook' && inputs.package != 'element-web-with-ec-component'
run: curl -s https://raw.githubusercontent.com/element-hq/element-call/main/config/netlify_redirects > webapp/_redirects
- name: Add config file
@@ -84,11 +88,13 @@ jobs:
with:
publish-dir: webapp
deploy-message: "Deploy from GitHub Actions"
alias: ${{ inputs.package == 'widget-rtc-sdk' && format('pr{0}-widget-rtc-sdk', inputs.pr_number) || inputs.package == 'storybook' && format('pr{0}-storybook', inputs.pr_number) || format('pr{0}', inputs.pr_number) }}
# Element Web with the component deploys for main too, without a PR number
alias: ${{ inputs.package == 'widget-rtc-sdk' && format('pr{0}-widget-rtc-sdk', inputs.pr_number) || inputs.package == 'storybook' && format('pr{0}-storybook', inputs.pr_number) || inputs.package == 'element-web-with-ec-component' && (inputs.pr_number && format('pr{0}-element-web', inputs.pr_number) || 'element-web') || format('pr{0}', inputs.pr_number) }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
# Element Web has many times the files of Element Call to upload
timeout-minutes: ${{ inputs.package == 'element-web-with-ec-component' && 10 || 1 }}
- name: 🚦 Update deployment status
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
+47 -4
View File
@@ -2,8 +2,10 @@ name: Deploy previews for PRs
on:
# zizmor: ignore[dangerous-triggers]
# Reason: This is now restricted to internal PRs only using the 'if' condition below.
# Runs once per finished workflow, and deploys only what that workflow built,
# so each preview goes up as soon as its own build is done
workflow_run:
workflows: ["Build"]
workflows: ["Build", "Build Element Web"]
types:
- completed
@@ -12,7 +14,7 @@ permissions: {}
jobs:
prdetails:
# Logic:
# 1. Build must be successful
# 1. The build workflow must be successful
# 2. Event must be a pull_request
# 3. Head repository must be the SAME as the base repository (No Forks!)
if: >
@@ -34,6 +36,7 @@ jobs:
branch: ${{ github.event.workflow_run.head_branch }}
netlify-full:
if: github.event.workflow_run.name == 'Build'
needs: prdetails
permissions:
deployments: write
@@ -51,6 +54,7 @@ jobs:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
netlify-widget-rtc-sdk:
if: github.event.workflow_run.name == 'Build'
needs: prdetails
permissions:
deployments: write
@@ -67,9 +71,48 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
element-web-built:
# A Build Element Web run started by a label it ignores skips every job
# and uploads nothing to deploy
if: github.event.workflow_run.name == 'Build Element Web'
needs: prdetails
runs-on: ubuntu-24.04
permissions:
actions: read
outputs:
built: ${{ steps.check.outputs.built }}
steps:
- id: check
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
count=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$RUN_ID/artifacts?name=build-output-element-web-with-ec-component" --jq '.total_count')
if [ "$count" -gt 0 ]; then built=true; else built=false; fi
echo "built=$built" >> "$GITHUB_OUTPUT"
netlify-element-web-with-ec-component:
# Element Web with this PR's component
if: needs.element-web-built.outputs.built == 'true'
needs: [prdetails, element-web-built]
permissions:
deployments: write
uses: $/.github/workflows/deploy-to-netlify.yaml
with:
artifact_run_id: ${{ github.event.workflow_run.id || github.run_id }}
pr_number: ${{ needs.prdetails.outputs.pr_number }}
pr_head_full_name: ${{ github.event.workflow_run.head_repository.full_name }}
pr_head_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.ref }}
deployment_ref: ${{ needs.prdetails.outputs.pr_data_json && fromJSON(needs.prdetails.outputs.pr_data_json).head.sha || github.ref || github.head_ref }}
package: element-web-with-ec-component
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
netlify-storybook:
needs: prdetails
if: ${{ needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'storybook build') }}
if: ${{ github.event.workflow_run.name == 'Build' && needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'storybook build') }}
permissions:
deployments: write
uses: $/.github/workflows/deploy-to-netlify.yaml
@@ -86,7 +129,7 @@ jobs:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
docker:
if: ${{ needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'docker build') }}
if: ${{ github.event.workflow_run.name == 'Build' && needs.prdetails.outputs.pr_data_json && contains(fromJSON(needs.prdetails.outputs.pr_data_json).labels.*.name, 'docker build') }}
needs: prdetails
permissions:
contents: write
+2 -2
View File
@@ -19,10 +19,10 @@ services:
- ./backend/playwright_homeserver-othersite.yaml:/data/cfg/homeserver.yaml:Z
element-web:
# Pin to a SHA so that upstream cannot break our tests. Renovate handles regular updates.
image: ghcr.io/element-hq/element-web:develop@sha256:a781033bb89c63e390c37d6904d4bcf34726045cd9217d733d2015db83028ba5
image: ghcr.io/element-hq/element-web:develop@sha256:a9fba6e7ea9a32f62bc1459fcdad790662476ff1b2bcebc62fe47e5cf51e3932
element-web-1:
# Pin to a SHA so that upstream cannot break our tests. Renovate handles regular updates.
image: ghcr.io/element-hq/element-web:develop@sha256:a781033bb89c63e390c37d6904d4bcf34726045cd9217d733d2015db83028ba5
image: ghcr.io/element-hq/element-web:develop@sha256:a9fba6e7ea9a32f62bc1459fcdad790662476ff1b2bcebc62fe47e5cf51e3932
volumes:
# The other site opens the embedded package under test in place of the
# copy its image bundles (the first site opens the dev server's app.
+25 -25
View File
@@ -46,31 +46,31 @@ possible to support encryption.
These parameters are relevant to both [widget](./embedded_standalone.md) and [standalone](./embedded_standalone.md) modes:
| Name | Values | Required for widget | Required for SPA | Description |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `intent` | `start_call`, `join_existing`, `start_call_voice`, `join_existing_voice`, `start_call_dm`, `join_existing_dm`, `start_call_dm_voice`, or `join_existing_dm_voice`. | No, defaults to `start_call` | No, defaults to `start_call` | The intent is a special url parameter that defines the defaults for all the other parameters. In most cases it should be enough to only set the intent to setup element-call. |
| `allowIceFallback` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Allows use of fallback STUN servers for ICE if the user's homeserver doesn’t provide any. |
| `posthogUserId` | Posthog analytics ID | No | No | Available only with user's consent for sharing telemetry in Element Web. |
| `confineToRoom` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Keeps the user confined to the current call/room. |
| `displayName` | | No | No | Display name used for auto-registration. |
| `enableE2EE` (deprecated) | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Legacy flag to enable end-to-end encryption, not used in the `livekit` branch. |
| `fontScale` | A decimal number such as `0.9` | No, defaults to `1.0` | No, defaults to `1.0` | Factor by which to scale the interface's font size. |
| `fonts` | | No | No | Defines the font(s) used by the interface. Multiple font parameters can be specified: `?font=font-one&font=font-two...`. |
| `header` | `none`, `standard` or `app_bar` | No, defaults to `standard` | No, defaults to `standard` | The style of headers to show. `standard` is the default arrangement, `none` hides the header entirely, and `app_bar` produces a header with a back button like you might see in mobile apps. The callback for the back button is `window.controls.onBackButtonPressed`. |
| `hideScreensharing` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Hides the screen-sharing button. |
| `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.) |
| `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. |
| `skipLobby` (deprecated: use `intent` instead) | `true` or `false` | No. If `intent` is explicitly `start_call` then defaults to `true`. Otherwise defaults to `false` | No, defaults to `false` | Skips the lobby to join a call directly, can be combined with preload in widget. When `true` the audio and video inputs will be muted by default. (This means there currently is no way to start without muted video if one wants to skip the lobby. Also not in widget mode.) |
| `theme` | One of: `light`, `dark`, `light-high-contrast`, `dark-high-contrast` | No, defaults to `dark` | No, defaults to `dark` | UI theme to use. |
| `background` | One of: `solid`, `gradient` | No, defaults to `gradient` | No, defaults to `gradient` | Visual style of the page background. |
| `viaServers` | Comma separated list of [Matrix Server Names](https://spec.matrix.org/v1.12/appendices/#server-name) | Not applicable | No | Homeserver for joining a room, non-empty value required for rooms not on the user’s default homeserver. |
| `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. |
| `autoLeave` | `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. |
| Name | Values | Required for widget | Required for SPA | Description |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `intent` | `start_call`, `join_existing`, `start_call_voice`, `join_existing_voice`, `start_call_dm`, `join_existing_dm`, `start_call_dm_voice`, `join_existing_dm_voice`, or `video_room`. | No, defaults to `start_call` | No, defaults to `start_call` | The intent is a special url parameter that defines the defaults for all the other parameters. In most cases it should be enough to only set the intent to setup element-call. |
| `allowIceFallback` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Allows use of fallback STUN servers for ICE if the user's homeserver doesn’t provide any. |
| `posthogUserId` | Posthog analytics ID | No | No | Available only with user's consent for sharing telemetry in Element Web. |
| `confineToRoom` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Keeps the user confined to the current call/room. |
| `displayName` | | No | No | Display name used for auto-registration. |
| `enableE2EE` (deprecated) | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Legacy flag to enable end-to-end encryption, not used in the `livekit` branch. |
| `fontScale` | A decimal number such as `0.9` | No, defaults to `1.0` | No, defaults to `1.0` | Factor by which to scale the interface's font size. |
| `fonts` | | No | No | Defines the font(s) used by the interface. Multiple font parameters can be specified: `?font=font-one&font=font-two...`. |
| `header` | `none`, `standard` or `app_bar` | No, defaults to `standard` | No, defaults to `standard` | The style of headers to show. `standard` is the default arrangement, `none` hides the header entirely, and `app_bar` produces a header with a back button like you might see in mobile apps. The callback for the back button is `window.controls.onBackButtonPressed`. |
| `hideScreensharing` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Hides the screen-sharing button. |
| `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.) |
| `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. |
| `skipLobby` (deprecated: use `intent` instead) | `true` or `false` | No. If `intent` is explicitly `start_call` then defaults to `true`. Otherwise defaults to `false` | No, defaults to `false` | Skips the lobby to join a call directly, can be combined with preload in widget. When `true` the audio and video inputs will be muted by default. (This means there currently is no way to start without muted video if one wants to skip the lobby. Also not in widget mode.) |
| `theme` | One of: `light`, `dark`, `light-high-contrast`, `dark-high-contrast` | No, defaults to `dark` | No, defaults to `dark` | UI theme to use. |
| `background` | One of: `solid`, `gradient` | No, defaults to `gradient` | No, defaults to `gradient` | Visual style of the page background. |
| `viaServers` | Comma separated list of [Matrix Server Names](https://spec.matrix.org/v1.12/appendices/#server-name) | Not applicable | No | Homeserver for joining a room, non-empty value required for rooms not on the user’s default homeserver. |
| `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. |
| `autoLeave` | `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. |
### Widget-only parameters
+7 -21
View File
@@ -134,7 +134,7 @@ importers:
version: 11.3.1(@types/react@19.3.3)(react@19.3.1)
'@vector-im/compound-web':
specifier: ^10.5.0
version: 10.6.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.3))(@types/react@19.3.3)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.3.3)(react@19.3.1))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
version: 10.7.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.3))(@types/react@19.3.3)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.3.3)(react@19.3.1))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
'@vitejs/plugin-react':
specifier: ^6.0.2
version: 6.3.0(@rolldown/plugin-babel@0.3.1(@babel/core@7.29.16(supports-color@7.2.0))(@babel/runtime@8.0.8)(rolldown@1.2.19)(vite@8.3.8(@types/node@26.6.11)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.108.2)(terser@5.46.1)(yaml@2.9.1)))(babel-plugin-react-compiler@1.0.0)(vite@8.3.8(@types/node@26.6.11)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.108.2)(terser@5.46.1)(yaml@2.9.1))
@@ -3273,8 +3273,8 @@ packages:
react:
optional: true
'@vector-im/compound-web@10.6.0':
resolution: {integrity: sha512-MNALzWkuo17qo6FWMvtqvkdGizkPzTeYp8J3yF+ZF2020jBxEVo9WLWNNBNig3K1inBMbSKQwxgOgu9Db6u6Sg==}
'@vector-im/compound-web@10.7.0':
resolution: {integrity: sha512-WP6/TcfxD2tuD8bw9FVAWIIGUti1WHKdojnble3MJmkC6fGRuEtl0p4Cz8ctmHY4XNkNKGGp5Nlax/Csry86IQ==}
peerDependencies:
'@fontsource/inconsolata': ^5
'@fontsource/inter': ^5
@@ -5997,18 +5997,6 @@ packages:
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
engines: {node: '>=8'}
ws@8.23.0:
resolution: {integrity: sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: '>=5.0.2'
peerDependenciesMeta:
bufferutil:
optional: true
utf-8-validate:
optional: true
ws@8.23.1:
resolution: {integrity: sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==}
engines: {node: '>=10.0.0'}
@@ -6205,7 +6193,7 @@ snapshots:
'@babel/helper-module-imports@7.29.7(supports-color@7.2.0)':
dependencies:
'@babel/traverse': 7.29.15(supports-color@7.2.0)
'@babel/traverse': 7.29.16(supports-color@7.2.0)
'@babel/types': 7.29.15
transitivePeerDependencies:
- supports-color
@@ -8635,7 +8623,7 @@ snapshots:
'@types/react': 19.3.3
react: 19.3.1
'@vector-im/compound-web@10.6.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.3))(@types/react@19.3.3)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.3.3)(react@19.3.1))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)':
'@vector-im/compound-web@10.7.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.3.0(@types/react@19.3.3))(@types/react@19.3.3)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.3.3)(react@19.3.1))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)':
dependencies:
'@floating-ui/react': 0.27.20(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
'@floating-ui/react-dom': 2.1.9(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
@@ -8688,7 +8676,7 @@ snapshots:
sirv: 3.0.2
tinyrainbow: 3.2.0
vitest: 4.1.12(@opentelemetry/api@1.9.1)(@types/node@26.6.11)(@vitest/browser-playwright@4.1.12)(@vitest/coverage-v8@4.1.12)(@vitest/ui@4.1.12)(jsdom@31.0.1)(vite@8.3.8(@types/node@26.6.11)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.108.2)(terser@5.46.1)(yaml@2.9.1))
ws: 8.23.0
ws: 8.23.1
transitivePeerDependencies:
- bufferutil
- msw
@@ -9423,7 +9411,7 @@ snapshots:
'@humanfs/node': 0.16.8
'@humanwhocodes/module-importer': 1.0.1
'@humanwhocodes/retry': 0.4.3
'@types/estree': 1.0.10
'@types/estree': 1.0.11
ajv: 6.15.0
chalk: 4.1.2
cross-spawn: 7.0.6
@@ -11640,8 +11628,6 @@ snapshots:
string-width: 4.2.3
strip-ansi: 6.0.1
ws@8.23.0: {}
ws@8.23.1: {}
wsl-utils@0.1.0:
+4 -2
View File
@@ -28,12 +28,14 @@
{
"groupName": "matrix-widget-api",
"matchDepNames": ["matrix-widget-api"],
"extends": ["schedule:weekly"]
"extends": ["schedule:weekly"],
"minimumReleaseAge": null
},
{
"groupName": "Compound",
"matchPackageNames": ["@vector-im/compound-{/,}**"],
"extends": ["schedule:weekly"]
"extends": ["schedule:weekly"],
"minimumReleaseAge": null
},
{
"groupName": "LiveKit client",
+21
View File
@@ -41,6 +41,7 @@ export enum UserIntent {
StartNewCallDMVoice = "start_call_dm_voice",
JoinExistingCallDM = "join_existing_dm",
JoinExistingCallDMVoice = "join_existing_dm_voice",
VideoRoom = "video_room",
Unknown = "unknown",
}
@@ -143,6 +144,18 @@ export interface UrlConfiguration {
* Defaults to true.
*/
noiseSuppression?: boolean;
/**
* Whether the user may start with the microphone on, whether or not the
* lobby is shown. Set by the intent, not a URL parameter.
* Defaults to true.
*/
initialAudioEnabled?: boolean;
/**
* Whether the user may start with the camera on, whether or not the lobby is
* shown. Set by the intent, not a URL parameter.
* Defaults to true.
*/
initialVideoEnabled?: boolean;
callIntent?: RTCCallIntent;
}
@@ -222,6 +235,14 @@ export function configurationForIntent(intent: UserIntent): UrlConfiguration {
preset.autoLeaveWhenOthersLeft = true;
preset.callIntent = preset.callIntent ?? RTC_CALL_INTENT_VIDEO;
break;
case UserIntent.VideoRoom:
preset.skipLobby = false;
preset.returnToLobby = true;
preset.callIntent = RTC_CALL_INTENT_VIDEO;
// Opening the room should not turn on the user's microphone or camera.
preset.initialAudioEnabled = false;
preset.initialVideoEnabled = false;
break;
// Non widget usecase defaults
default:
preset = {
+27
View File
@@ -318,6 +318,20 @@ describe("UrlParams", () => {
).toMatchObject(joinExistingCallDefaults("desktop"));
});
it("accepts video_room", () => {
expect(
computeUrlParams(
"?intent=video_room&widgetId=1234&parentUrl=parent.org",
),
).toMatchObject({
...joinExistingCallDefaults("desktop"),
returnToLobby: true,
callIntent: RTC_CALL_INTENT_VIDEO,
initialAudioEnabled: false,
initialVideoEnabled: false,
});
});
it("accepts start_call_voice", () => {
expect(
computeUrlParams(
@@ -408,6 +422,19 @@ describe("UrlParams", () => {
});
});
describe.each(["initialAudioEnabled", "initialVideoEnabled"] as const)(
"%s",
(name) => {
it("is not read from the URL", () => {
expect(
computeUrlParams(
`?${name}=false&intent=join_existing&widgetId=1234&parentUrl=parent.org`,
)[name],
).toBeUndefined();
});
},
);
describe("noiseSuppression", () => {
it("defaults to true", () => {
expect(computeUrlParams().noiseSuppression).toBe(true);
+5 -5
View File
@@ -36,13 +36,13 @@ export interface AudioOutputSwitcher {
* The Snapshot combines all fields required to populate the view.
*
* It is a combination of Actions and State.
* All Actions and State will be wrappen in behaviors.
* This has the advantage, that actions can mutate.
* (example: a device gets disconnected, the swicht action is not possible anymore, the actions becomes undefined)
* With it being reactive we can use the existance of the action to update the rendering without
* All Actions and State will be wrapped in behaviors.
* This has the advantage that actions can mutate.
* (example: a device gets disconnected, the switch action is not possible anymore, the action becomes undefined)
* With it being reactive we can use the existence of the action to update the rendering without
* requiring additional state.
*
* Comment: It might not make sense to seperate the two interfaces. Hence the seperation
* Comment: It might not make sense to separate the two interfaces. Hence the separation
* just happens on the syntax level with the `type = ... & ...` notation.
*/
export type FooterSnapshot = FooterActions & FooterState;
+28
View File
@@ -31,6 +31,8 @@ test.each<{
false,
callIntent,
allowJoinUnmutedViaIntent,
true,
true,
);
expect(audioEnabled).toBe(true);
expect(videoEnabled).toBe(callIntent !== RTC_CALL_INTENT_AUDIO);
@@ -50,6 +52,8 @@ test.each<{
true,
callIntent,
false,
true,
true,
);
expect(audioEnabled).toBe(false);
expect(videoEnabled).toBe(false);
@@ -69,8 +73,32 @@ test.each<{
true,
callIntent,
true,
true,
true,
);
expect(audioEnabled).toBe(true);
expect(videoEnabled).toBe(callIntent !== RTC_CALL_INTENT_AUDIO);
},
);
test.each<{
initialAudioEnabled: boolean;
initialVideoEnabled: boolean;
}>([
{ initialAudioEnabled: false, initialVideoEnabled: true },
{ initialAudioEnabled: true, initialVideoEnabled: false },
{ initialAudioEnabled: false, initialVideoEnabled: false },
])(
"Should start the devices the intent disables muted, even if allowed unmuted (initialAudioEnabled: $initialAudioEnabled, initialVideoEnabled: $initialVideoEnabled)",
({ initialAudioEnabled, initialVideoEnabled }) => {
const { audioEnabled, videoEnabled } = calculateInitialMuteState(
false,
RTC_CALL_INTENT_VIDEO,
true,
initialAudioEnabled,
initialVideoEnabled,
);
expect(audioEnabled).toBe(initialAudioEnabled);
expect(videoEnabled).toBe(initialVideoEnabled);
},
);
+10 -4
View File
@@ -21,14 +21,20 @@ import {
* @param allowJoinUnmutedViaIntent Whether the host vouches for the intent
* enough to start the user unmuted without a lobby (see
* `HostBridge.allowJoinUnmutedViaIntent`).
* @param initialAudioEnabled Whether the intent lets the microphone start on
* (see `UrlConfiguration.initialAudioEnabled`). Only ever turns it off.
* @param initialVideoEnabled Whether the intent lets the camera start on (see
* `UrlConfiguration.initialVideoEnabled`). Only ever turns it off.
*/
export function calculateInitialMuteState(
skipLobby: boolean,
callIntent: RTCCallIntent | undefined,
allowJoinUnmutedViaIntent: boolean,
initialAudioEnabled: boolean,
initialVideoEnabled: boolean,
): { audioEnabled: boolean; videoEnabled: boolean } {
logger.debug(
`calculateInitialMuteState: skipLobby=${skipLobby}, callIntent=${callIntent} allowJoinUnmutedViaIntent=${allowJoinUnmutedViaIntent}`,
`calculateInitialMuteState: skipLobby=${skipLobby}, callIntent=${callIntent} allowJoinUnmutedViaIntent=${allowJoinUnmutedViaIntent} initialAudioEnabled=${initialAudioEnabled} initialVideoEnabled=${initialVideoEnabled}`,
);
if (skipLobby && !allowJoinUnmutedViaIntent) {
@@ -44,9 +50,9 @@ export function calculateInitialMuteState(
// A host that vouches for the intent is a trusted environment, so it allows
// unmuted by default. Same for when showing a lobby, as users can adjust
// their settings there. Additionally, if the call intent is "m.audio", we
// disable video by default.
// disable video by default. The intent can still start either off.
return {
audioEnabled: true,
videoEnabled: callIntent != RTC_CALL_INTENT_AUDIO,
audioEnabled: initialAudioEnabled,
videoEnabled: initialVideoEnabled && callIntent != RTC_CALL_INTENT_AUDIO,
};
}
+2
View File
@@ -40,6 +40,8 @@ export function useMuteStates(): MuteStates | null {
urlParams.skipLobby,
urlParams.callIntent,
hostBridge.allowJoinUnmutedViaIntent,
urlParams.initialAudioEnabled ?? true,
urlParams.initialVideoEnabled ?? true,
),
hostBridge,
),
+1 -1
View File
@@ -68,7 +68,7 @@ export interface WidgetHelpers {
* @returns A point of access to the widget API, or null if Element Call is not
* running as a widget.
*/
// this needs to be a seperate call and cannot be done on import to allow us to spy on methods in here before
// this needs to be a separate call and cannot be done on import to allow us to spy on methods in here before
// execution.
export const initializeWidget = (
rtcApplication: string = "m.call",