Compare commits

..
Author SHA1 Message Date
renovate[bot] 09a94e4603 Update ghcr.io/element-hq/element-web:develop Docker digest to c850f50 2026-11-25 01:06:52 +00:00
Timo 69ad5ff68c Merge pull request #4493 from element-hq/renovate/compound
Update dependency @vector-im/compound-web to v10.6.0
2026-11-24 14:40:04 +01:00
Timo K. cc93991fbe update snapshots 2026-11-24 12:43:41 +01:00
Timo 7b803e1dc8 Merge pull request #4497 from element-hq/toger5/agents-create-factories
Document create$ factories as the default for new state
2026-11-24 12:12:30 +01:00
Timo 96e6a811f4 Merge pull request #4498 from element-hq/toger5/lobby-vs-skip-lobby
Skip Lobby vs Lobby behavior inconsistencies
2026-11-24 09:40:38 +01:00
TimoandElementBot 2b5ad74ede Update src/useLocalMedia.ts
Co-authored-by: ElementBot <110224175+ElementBot@users.noreply.github.com>
2026-11-24 09:27:49 +01:00
renovate[bot] 208ef89d7c Update ghcr.io/element-hq/element-web:develop Docker digest to fabb94b (#4499)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-24 01:31:15 +00:00
Timo K. a3edc058a0 use the same resolution (for lobby -> call) as in the skip lobby case IF
the config.json configures a custom resolution
2026-11-23 19:11:52 +01:00
Timo K.andClaude Fable 5.2 1b94460ddf Open a lobby camera at the resolution the call captures at
A camera opened in the lobby carried a resolution only where the request
had one, which the app sends only with the advanced camera settings on.
The browser then picked, commonly a lower resolution, and the track kept
it for the whole call. A join without a lobby lets LiveKit capture at
the room's default, 1280x720 at 30 fps.

A camera request without a resolution is now opened at that default, as
a preference, so a camera that cannot do it still opens.

This matches the call only for the default media quality: a host that
configures another max_resolution is not followed in the lobby.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 18:25:48 +01:00
Timo K.andClaude Fable 5.2 17e3c02aa5 Return to the device a track had where a switch in the call fails
LiveKit stops a track before it opens the device asked for. A switch to
a device that cannot be opened therefore left the camera or microphone
stopped, where setDevice promises to leave the track on the device it
had: others saw a black tile or heard nothing until the device was
toggled.

A failed switch now switches back to the previous device before it
rejects with the original error. A muted track is left alone: it is
stopped already, and LiveKit restores the device it opens on unmute.

The exact match is passed explicitly rather than left to LiveKit's
default.

Follow-up to the review of #4486.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 18:24:08 +01:00
Timo K.andClaude Fable 5.2 d3b653d25d Let only the device that is gone off the one picked
Where a remembered microphone or camera was unplugged, the lobby dropped
the device of both sources and opened the browser's choice for each, so
the camera the user picked was lost along with the missing microphone.

The request is now retried with one source let off its device at a time,
then both, since the refusal does not say which device is gone. A source
let off asks for the same device as a preference, which is what LiveKit
falls back to for the captures it makes in the call.

The refusal is recognised by name, so one that is not an Error takes the
fallback too.

Follow-up to the review of #4486.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 18:22:59 +01:00
Timo K.andClaude Opus 5.5 f1e82b9e85 Document create$ factories as the default for new state
Name new state factories create<Thing>$, keep mutable state in local
subjects exposed through the scope, release resources in scope.onEnd,
and put helpers beneath the returned object. Resource owners no longer
need to be classes; the existing ones stay until converting them is
the task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:50:37 +01:00
Timo 6be739f168 Merge pull request #4489 from element-hq/toger5/lint-externals-ci
Add the externals check to our CI and add the missing external js-sdk dep
2026-11-23 10:44:59 +01:00
renovate[bot] 382c688a2f Update ghcr.io/element-hq/element-web:develop Docker digest to b355371 (#4492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-23 02:11:37 +00:00
renovate[bot] ff11990046 Update dependency @vector-im/compound-web to v10.6.0 2026-11-23 02:05:39 +00:00
renovate[bot] b480f7ebb4 Update ghcr.io/element-hq/element-web:develop Docker digest to 3a518f4 (#4491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-22 01:52:16 +00:00
renovate[bot] b2f7fccc6e Update ghcr.io/element-hq/element-web:develop Docker digest to 2f9e5d9 (#4490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-21 02:07:47 +00:00
Timo K. eb5c4b8633 Add the externals check to our CI and add the missing external js-sdk
dep
2026-11-20 18:15:57 +01:00
TimoandClaude Fable 5.2 f9dafcd5ea Publish late device (#4485)
* Publish a camera or microphone listed after the call view opened

Without a lobby the call decides what to publish once, as its view
mounts. A device the browser listed a moment later switched to its
default "on" without the mute handler being asked, so the button showed
on and nothing was published: the other side kept waiting for media.

The default is now asked of the handler like any other request where one
is set, so the call publishes the device. A device that comes back while
a handler is set stays off, since the user may have turned it off; the
button used to show it as on there too. Without a handler, as in the
lobby, the default is assumed at once as before.

Follows the patch tiran133 posted on the issue. A stop-gap until one
reconciler owns the local media.

Fixes https://github.com/element-hq/element-call/issues/4403

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 17:07:51 +00:00
Timo ded4471525 Merge pull request #4486 from element-hq/toger5/4479-exact-device-constraint
Exact device constraint (fixes chrome device switches)
2026-11-20 17:57:43 +01:00
Timo K. e74e83ab08 comments on what fixes the chrome issue 2026-11-20 17:15:41 +01:00
Johannes Marbach 3917bbb8f2 Merge pull request #4484 from ciefa/ciefa/fullscreen-button-clear-of-footer
Keep the tile buttons clear of the footer when it overlays the video
2026-11-20 15:33:43 +01:00
Timo K.andClaude Fable 5.2 4c66fe6f7d Ask the browser for the exact camera and microphone picked
Chromium hands back its default device for a deviceId that is only
preferred, so picking another camera reopened the same one: the preview
flashed and nothing changed. The lobby's own capture and the in-call
switch both passed the id as a preference since they stopped going
through LiveKit's track creation, which made it exact.

- The lobby media asks for the exact device, and falls back to the
  browser's choice only where the remembered device is gone.
- A track handed over to the call keeps the exact device, so that LiveKit
  reopens the same one after a mute.
- Switching the facing mode lets go of the pinned device.
- setDevice rejects where the track did not end up on the device, in the
  lobby and in the call, and keeps the track it had.

Fixes https://github.com/element-hq/element-call/issues/4479

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 14:07:17 +01:00
Johannes Marbach ffd6360277 Merge pull request #4472 from element-hq/johannes/stable-rtc-device
Request capability to receive m.rtc.encryption_key events
2026-11-20 11:37:20 +01:00
Johannes Marbach eabc6c0823 Merge branch 'main' into johannes/stable-rtc-device 2026-11-20 10:53:09 +01:00
renovate[bot] 7d6fbd336d Update ghcr.io/element-hq/element-web:develop Docker digest to dd8dbe3 (#4482)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-20 09:52:33 +00:00
Johannes Marbach f9fb566f41 Merge branch 'main' into johannes/stable-rtc-device 2026-11-20 09:21:20 +01:00
Santino Wagner 95a646b3bc Keep the tile buttons clear of the footer when it overlays the video
In a call view at most 600px high, and in a one-on-one call in a view
at most 600px wide, the footer is drawn over the video. The spotlight
tile's bottom-right buttons (full screen, expand, screen share volume)
stayed pinned to the tile's bottom edge, underneath the footer, so a
click on them landed on the footer instead.

Offset the buttons by --call-view-safe-area-inset-bottom, which the call
view already sets to the footer's height while the footer overlays the
tiles. The media foreground of a maximised tile uses the same inset. The
variable is unset in every other layout, so nothing moves there.

The rule is not limited to maximised tiles: with the layout switch on
"grid", a short window shows a spotlight tile that is not maximised but
still reaches the bottom edge.
2026-11-19 16:35:00 +01:00
Johannes Marbach 6cdcd5e83e Merge branch 'main' into johannes/stable-rtc-device 2026-11-19 09:16:01 +01:00
Johannes Marbach 1cdcb62791 Request capability to receive m.rtc.encryption_key events 2026-11-18 11:16:41 +01:00
30 changed files with 1254 additions and 482 deletions
+2
View File
@@ -41,3 +41,5 @@ jobs:
run: "pnpm run lint:types"
- name: Dead code analysis
run: "pnpm run lint:knip"
- name: Component externals
run: "pnpm run lint:externals"
+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:f85350f2b31a7521a800d9050e9f5c0676d04cfb60675242ccc0c6e25cad7d04
image: ghcr.io/element-hq/element-web:develop@sha256:c850f5058acf2eeb9ed4b392f2f3e53b02240e7a74af8e5f7cc8424d12974c49
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:f85350f2b31a7521a800d9050e9f5c0676d04cfb60675242ccc0c6e25cad7d04
image: ghcr.io/element-hq/element-web:develop@sha256:c850f5058acf2eeb9ed4b392f2f3e53b02240e7a74af8e5f7cc8424d12974c49
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.
+11 -6
View File
@@ -4,12 +4,17 @@
- Call logic lives in `src/state/`. A component that derives call state is
misplaced logic.
- Composing behaviors: a factory taking `(scope, ...deps$)`, returning named
behaviors plus callbacks. Copy `src/state/LayoutSwitchViewModel.ts`. Prefer this
for anything new.
- Owning a resource: a class taking the scope in its constructor — `MediaDevices`,
`MuteStates`, `TileStore`, `Publisher`, `Connection`. Both styles are current;
don't convert one to the other in passing.
- New state is a `create<Thing>$(scope, …)` factory returning an interface of
named behaviors plus callbacks — `createCallViewModel$`,
`createCallNotificationLifecycle$`, the SDK's `createLocalMembership$`. Prefer
it to a class for anything new, including something that owns a resource.
- Inside the factory, mutable state is a local `BehaviorSubject` exposed through
`scope.behavior(…)`, a resource is released in `scope.onEnd`, and the returned
object comes before the helpers it calls, which are `function` declarations
beneath it.
- Older resource owners are classes taking the scope in their constructor —
`MediaDevices`, `MuteStates`, `TileStore`, `Publisher`, `Connection`. Convert
one only when that is the task, never in passing.
- A factory's required parameters are what the thing is made of: no sensible
default. Several of them go in a props interface, so each can carry a doc
comment. Its trailing `options` bag is how the host wants it to behave: every
-1
View File
@@ -51,7 +51,6 @@
"build-storybook": "storybook build"
},
"devDependencies": {
"@base-ui/react": "^1.9.0",
"@codecov/vite-plugin": "^1.3.0",
"@fontsource/inconsolata": "^5.1.0",
"@fontsource/inter": "^5.1.0",
+78
View File
@@ -0,0 +1,78 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test, type Page } from "@playwright/test";
import { SpaHelpers } from "./spa-helpers.ts";
test.use({
launchOptions: {
args: [
"--use-fake-ui-for-media-stream",
"--use-fake-device-for-media-stream=device-count=2",
"--mute-audio",
],
},
});
test.describe("the camera menu", () => {
test.skip(
({ browserName }) => browserName !== "chromium",
"Only Chromium offers a second fake camera",
);
test("moves the preview to the camera picked, and the call after it", async ({
page,
}) => {
await page.goto("/");
await SpaHelpers.createCall(page, "Camera user", "Camera switch");
await expectCamera(page, "fake_device_0");
await selectCamera(page, "fake_device_1");
await expectCamera(page, "fake_device_1");
await page.getByTestId("lobby_joinCall").click();
await expect(page.getByTestId("name_tag")).toContainText("Camera user");
await expectCamera(page, "fake_device_1");
await selectCamera(page, "fake_device_0");
await expectCamera(page, "fake_device_0");
// Turning the camera on again opens it anew
const camera = page.getByTestId("incall_videomute");
await camera.click();
await expect(camera).toHaveAttribute("aria-checked", "false");
await camera.click();
await expect(camera).toHaveAttribute("aria-checked", "true");
await expectCamera(page, "fake_device_0");
});
});
async function selectCamera(page: Page, name: string): Promise<void> {
await page.getByRole("button", { name: "Camera", exact: true }).click();
await page.getByRole("menuitemradio", { name }).click();
// Selecting doesn't close the menu, so dismiss it.
await page.keyboard.press("Escape");
await expect(page.getByRole("menu")).not.toBeVisible();
}
/** Every video on the page shows this camera, and there is one that does. */
async function expectCamera(page: Page, label: string): Promise<void> {
await expect
.poll(async () =>
page.evaluate(() => [
...new Set(
[...document.querySelectorAll("video")].flatMap((video) =>
video.srcObject instanceof MediaStream
? video.srcObject.getVideoTracks().map((track) => track.label)
: [],
),
),
]),
)
.toEqual([label]);
}
+36
View File
@@ -0,0 +1,36 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test } from "@playwright/test";
import { SpaHelpers } from "./spa-helpers.ts";
test("The full screen button can be clicked while the footer overlays the video", async ({
page,
}) => {
await page.goto("/");
await SpaHelpers.createCall(page, "John Doe", "ShortWindow", true);
await SpaHelpers.expectVideoTilesCount(page, 1);
const fullScreenButton = page.getByRole("button", { name: "maximise" });
const footer = page.getByTestId("footer-container");
// Short enough for the footer to be drawn over the video
await page.setViewportSize({ width: 1000, height: 500 });
await expect(fullScreenButton).toBeVisible();
await page.getByTestId("videoTile").first().hover();
await expect(footer).toHaveCSS("opacity", "1");
const buttonBox = (await fullScreenButton.boundingBox())!;
const footerBox = (await footer.boundingBox())!;
expect(buttonBox.y + buttonBox.height).toBeLessThanOrEqual(footerBox.y);
await fullScreenButton.click();
await expect
.poll(async () => page.evaluate(() => document.fullscreenElement !== null))
.toBe(true);
});
+95
View File
@@ -0,0 +1,95 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test, type Page } from "@playwright/test";
import { widgetTest } from "../fixtures/widget-user.ts";
import { TestHelpers } from "./test-helpers.ts";
widgetTest.use({ callType: "dm" });
// The bug from issue #4403, in a real call between two users in Element Web.
// 1. Brooks' browser is made slow: it lists its camera and microphone only
// after the call is on screen.
// 2. Brooks starts a video call in a DM. A DM call has no lobby.
// 3. Whistler picks up.
// 4. Brooks' camera button shows "on".
// 5. Whistler must see two videos: their own and the one brooks sends.
// Before the fix whistler saw only their own video.
//
// What it guards: the unit tests only check the mute button's own logic. This
// test checks the whole chain: button, call, SFU, and what the other person
// really sees. The bug depends on timing (camera listed before or after the
// call opens), so the normal DM call tests pass by luck most of the time.
// This test forces the bad timing every run, so a regression shows up always
// and not only sometimes.
widgetTest(
"Publishes a camera the browser lists only once the call is on screen",
async ({ asWidget, browserName }) => {
test.skip(
browserName === "firefox",
"The is test is not working on firefox CI environment. No mic/audio device inputs so cam/mic are disabled",
);
// Two Element Webs and a real call.
test.slow();
const { brooks, whistler } = asWidget;
await listDevicesOnlyInTheCall(brooks.page);
await TestHelpers.startCallInCurrentRoom(brooks.page, false);
await expect(whistler.page.getByText("Incoming video call")).toBeVisible();
await whistler.page
.getByRole("alert")
.getByRole("button", { name: "Join" })
.click();
const brooksFrame = brooks.page
.locator('iframe[title="Element Call"]')
.contentFrame();
await expect(
brooksFrame.getByRole("switch", { name: "Stop video", checked: true }),
).toBeVisible();
// Whistler's own camera and the one brooks sends
const whistlerFrame = whistler.page
.locator('iframe[title="Element Call"]')
.contentFrame();
await TestHelpers.expectVisibleVideoCount(whistlerFrame, 2);
await expect(whistlerFrame.getByText("Waiting for media...")).toHaveCount(
0,
);
},
);
/**
* Holds the device list back in the widget until the call view shows a tile,
* as a browser that is slow to answer does. Call before the widget loads.
*
* How: it replaces the browser's `enumerateDevices` with one that waits. It
* checks every 50ms whether a video tile is on the page, waits half a second
* more, and only then gives the real list. Element Web itself (the outer
* page) is left alone; only the call inside the iframe is slowed down.
*/
async function listDevicesOnlyInTheCall(page: Page): Promise<void> {
await page.addInitScript(() => {
if (window.parent === window) return;
const devices = navigator.mediaDevices;
const enumerate = devices.enumerateDevices.bind(devices);
const inTheCall = new Promise<void>((resolve) => {
const poll = setInterval(() => {
if (document.querySelector("[data-testid='videoTile']") === null)
return;
clearInterval(poll);
setTimeout(resolve, 500);
}, 50);
});
devices.enumerateDevices = async (): Promise<MediaDeviceInfo[]> => {
await inTheCall;
return enumerate();
};
});
}
+349 -148
View File
@@ -22,9 +22,6 @@ importers:
.:
devDependencies:
'@base-ui/react':
specifier: ^1.9.0
version: 1.9.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@codecov/vite-plugin':
specifier: ^1.3.0
version: 1.9.1(vite@8.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.103.1)(terser@5.46.1)(yaml@2.9.0))
@@ -135,7 +132,7 @@ importers:
version: 11.3.1(@types/react@19.2.18)(react@19.2.8)
'@vector-im/compound-web':
specifier: ^10.5.0
version: 10.5.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.2.18)(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
version: 10.6.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.2.18)(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@vitejs/plugin-react':
specifier: ^6.0.2
version: 6.1.1(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7(supports-color@7.2.0))(@babel/runtime@8.0.8)(rolldown@1.2.15)(vite@8.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.103.1)(terser@5.46.1)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.2.4(@types/node@24.13.3)(esbuild@0.28.2)(jiti@2.7.0)(sass@1.103.1)(terser@5.46.1)(yaml@2.9.0))
@@ -419,33 +416,6 @@ packages:
resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==}
engines: {node: '>=6.9.0'}
'@base-ui/react@1.9.0':
resolution: {integrity: sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ==}
engines: {node: '>=14.0.0'}
peerDependencies:
'@date-fns/tz': ^1.2.0
'@types/react': ^17 || ^18 || ^19
date-fns: ^4.0.0
react: ^17 || ^18 || ^19
react-dom: ^17 || ^18 || ^19
peerDependenciesMeta:
'@date-fns/tz':
optional: true
'@types/react':
optional: true
date-fns:
optional: true
'@base-ui/utils@0.5.0':
resolution: {integrity: sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A==}
peerDependencies:
'@types/react': ^17 || ^18 || ^19
react: ^17 || ^18 || ^19
react-dom: ^17 || ^18 || ^19
peerDependenciesMeta:
'@types/react':
optional: true
'@bcoe/v8-coverage@1.0.2':
resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==}
engines: {node: '>=18'}
@@ -2039,8 +2009,11 @@ packages:
'@radix-ui/primitive@1.1.7':
resolution: {integrity: sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==}
'@radix-ui/react-arrow@1.1.15':
resolution: {integrity: sha512-v4zggRcjadnI+ClKDuijlQEW4tw3NoaeHc/PwpKnLoLLKNUG4InLegkstooLcRIUWCs+8L22dGURCVuFfOKfnA==}
'@radix-ui/primitive@1.2.0':
resolution: {integrity: sha512-KABY+VMIRPJL+Vyzv/335FEhXXD/xDv8BMb1kl48/aXJZMH0LtHCTx5ga5RnxaEP3nZHtmTLf1P9vanmFX46bw==}
'@radix-ui/react-arrow@1.1.17':
resolution: {integrity: sha512-67jjcVvxjXCCStnTW3Z+M7jmaFMuMR7M2JgpDzH4w7JSRrikmzhjfYgP/09ECb8n7whnsgh1ifJ+Ie96qEj+pQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2065,6 +2038,19 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-collection@1.2.0':
resolution: {integrity: sha512-+yiQzqcc7Sy7/5s0jrMCjpPRFB3538VNrXPWdTLZhE/SCfgEws4aI6lHWN/vvcnyhHndROWBzqmqB4QBrITZ9Q==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-compose-refs@1.1.5':
resolution: {integrity: sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==}
peerDependencies:
@@ -2074,8 +2060,8 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-context-menu@2.3.7':
resolution: {integrity: sha512-CtXP35dxaB5T3zXSd+E3uHe/QpXcpYnZmxp6OaIbfthtfW4wyb77M23BG+bwIJDtsMwEP/YssdsmNyZu7jhWew==}
'@radix-ui/react-context-menu@2.4.1':
resolution: {integrity: sha512-Pddn3Z8lio3/ChxyXaEP3jHTTo1LTHCWwF8+mG1chQlWijP+ttVHBKwezrQTiV6Mj670ojvumqvuGh+mdv33iQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2096,6 +2082,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-context@1.3.0':
resolution: {integrity: sha512-v5AYEocMISkbJ+1fTXzZpiFv7NRr3D2WiYbLIKf+FkmJ8VkP6d503eV2n34MFussHXY1pcoq3yfJiQH77dc4Mg==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-dialog@1.1.23':
resolution: {integrity: sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA==}
peerDependencies:
@@ -2118,6 +2113,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-direction@1.2.0':
resolution: {integrity: sha512-FtRA52a/r+LKStFT+neLUm+8vSe7wbzkbQGGeU8ixFiwC8NU14Evoq9ATECqL3eGbcUzJR4fyfA4KkK/q6dfqg==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-dismissable-layer@1.1.19':
resolution: {integrity: sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==}
peerDependencies:
@@ -2131,8 +2135,21 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-dropdown-menu@2.1.24':
resolution: {integrity: sha512-geq8l2rJkxvkXsT9RMgtUE3P8pITFpTsvYpbySi1IH4fZEABD/Gp85myayFgxk0ktljGMJnCbeFkyTusvSvv7g==}
'@radix-ui/react-dismissable-layer@1.2.1':
resolution: {integrity: sha512-KIfDcAsx+oVylFZ4xryVKusJUrLLhTQmfnJW4kwk4Km5myvhHCrj04hnWWUC166+xD4DHdH8tQGylwYX1h6+Pg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-dropdown-menu@2.2.1':
resolution: {integrity: sha512-XsHcmYG2AcqnvTqrOXXWcMrhquEIlqucizuDH1MV/qMRW+DndpBCMvNeTRXOxqmG1H5j89M/+I0/34Zdd+zDcQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2153,6 +2170,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-focus-guards@1.2.0':
resolution: {integrity: sha512-MPm5R0iRGUDrDnPNxmLBkv+X7pN4XKzt+MbWJEuJQsH3NFH4omrbpXpucyYCCKTSt+na/ZxGhEWQrWTZ0285cA==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-focus-scope@1.1.16':
resolution: {integrity: sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==}
peerDependencies:
@@ -2166,8 +2192,21 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-form@0.1.16':
resolution: {integrity: sha512-Q4TLEn2A7TAypxwmd6R9EwrlXDvkfYSDMrq9/887AXAGh+G1rH+kYJKSTv+Si9Y0JPKTwKYv6PviAJosysNimA==}
'@radix-ui/react-focus-scope@1.3.1':
resolution: {integrity: sha512-ugeMhbXt4y5S2T1GnIqbWDKEN962PDwnX1fN0eKOOgf5f63Dh2mn8F1FUySlgW0iF6GiVsRF32DzuDIWTUyQJg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-form@0.3.0':
resolution: {integrity: sha512-KnmrCM27m7Jo1R8S6cFDPrEeq20Jfn5dqde0SZrJr2lVXlj6/QZSUCyFoYh1d8ti0uUrMNK5Lx6dUDuINT+f4Q==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2188,8 +2227,8 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-label@2.1.15':
resolution: {integrity: sha512-o/rdYEwZTTo5tjknnPeyQFU45kUC4i/XyeDPP+HGyi6XqpOP6Zf5Ya5vh/Yfe9Id5JiuWnnAx2XqIeD3UYZt0g==}
'@radix-ui/react-label@2.1.17':
resolution: {integrity: sha512-xmj7MN/drx1oUAXkfiFIvyDmGNUIN/omGobvA5oAoNqu9zO2MkISYGZOkBcqSzs/UZXXwV+/3ACRE7q7mGcmkA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2201,8 +2240,8 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-menu@2.1.24':
resolution: {integrity: sha512-uW7RVuU6Lp/ZtfeY4b3kL32zccgEWvPv1+cf17ubYzHa9cL8AHokmk36cG/XEiH/smbQvumnieXX9j/e9RqJWA==}
'@radix-ui/react-menu@2.2.1':
resolution: {integrity: sha512-G34BsU90SBj5foYpz8pQqq/Q0Dlfyyl6KitWEfRwXC0QvfwhWNAwS49DWP2+rRJ0iwv20Z2Qx7Sk+T03bGo5JA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2214,8 +2253,8 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-popper@1.3.7':
resolution: {integrity: sha512-UsJrrd7w4wuKKTdvd/DNERVlwSlUcyXzjhyDwBk+3aPOsCjOY6ZSbxuw8E6lZTjjfP8Cpd0J8VVkrYUWyGYXyg==}
'@radix-ui/react-popper@1.4.0':
resolution: {integrity: sha512-yCWRvLeGv9Pz3+efwHqGPp70mZ56r3kfIgQVF56Oj2aAa4uP/Tb+IE59wNcc+758rctqbCKx4LbK8II/r7Bn0Q==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2240,6 +2279,19 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-portal@1.2.0':
resolution: {integrity: sha512-StX7xXnaRU41VvFtMm9zlhVGz8XF6GmWWTXftkQaY+tqVkbs/R9UmAp5mLzHHapk5hM9RMZQvO/3usyIP/g42g==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-presence@1.1.10':
resolution: {integrity: sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==}
peerDependencies:
@@ -2253,6 +2305,19 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-presence@1.1.11':
resolution: {integrity: sha512-Z7/atlkab36Z8hm+V8zYc79r0W+tiOB1o0tun1By94JyadkekLQmtEAnBSP9XKXBNQsStoStS4+gX10JpS5akA==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-primitive@2.1.10':
resolution: {integrity: sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==}
peerDependencies:
@@ -2266,8 +2331,8 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-progress@1.1.16':
resolution: {integrity: sha512-5XnomAsoZZCY+KNTxbIghpGqPruZvKFNlvcAljVAOdDRDsH4/OZQxhtwo5wdtoDM5R6MhJBb2sPnDuRFep3lzg==}
'@radix-ui/react-primitive@2.2.0':
resolution: {integrity: sha512-HCTSPMNqv55Qk0IX4geJbpyXazmqulcimwuyjxTkKi29v+QZbG2Zho9BnbBq4YS2PF+KlNb2CXoLz66uUmblkg==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2279,8 +2344,8 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-roving-focus@1.1.19':
resolution: {integrity: sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ==}
'@radix-ui/react-progress@1.2.1':
resolution: {integrity: sha512-yQBiM6J3YM8Ums1orkEFpbznK47geKxa0igikzcaS1xHgdba3DdAQBsGbCTt5BVfR8zhEvgxQ0poGcINaD3lvw==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2292,8 +2357,21 @@ packages:
'@types/react-dom':
optional: true
'@radix-ui/react-separator@1.1.15':
resolution: {integrity: sha512-jOLO4lssEzWpoDu7G+Ze4VjwMRUBt291pnZD0gmalREZipnTX3wadQo7Fy48GCTfe14/YRN6rw/rOJqrE85Wxw==}
'@radix-ui/react-roving-focus@1.2.1':
resolution: {integrity: sha512-UwraORzVUeEPMclhO1p0vz0qI+TbdDLO9i+FiOqhJyHKwdpCRCck9yVEscUnAMIzCiuNoQa8D4A9bIpOPXGt6Q==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@types/react-dom':
optional: true
'@radix-ui/react-separator@1.2.0':
resolution: {integrity: sha512-1jUAap0wZEqVP05Ou7kJgRxe/W+Qftng+rUNWGa0qkKbv9r5pWTG3E7a3ELKo2eJoHKMECnzuYrZpSyO1YgcYQ==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -2327,6 +2405,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-slot@1.5.0':
resolution: {integrity: sha512-tyYd9ddPXAysAbdbD9eYxgwpCSv6f3PncqVSNKQFSR5lcJVLz3cb/pANDoYrLiHBpXv7skortyUgGUWsYuPPFQ==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-use-callback-ref@1.1.4':
resolution: {integrity: sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==}
peerDependencies:
@@ -2336,6 +2423,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-use-callback-ref@1.1.5':
resolution: {integrity: sha512-Y5GBf4NKeADoXI1geiMlMuMoURT3k9MizzzKhGb/m55H94aGigZ01PIpkvsO6lML13BA6XYAXSJ6gza7vTn5nw==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-use-controllable-state@1.2.6':
resolution: {integrity: sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==}
peerDependencies:
@@ -2345,6 +2441,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-use-controllable-state@1.3.0':
resolution: {integrity: sha512-TAcBI7bw2ljYCbv4+zuTSd6zICu8pRt6SDN2vJ/Z06K2MXh6I9WYFe/A9ovlFDtR5HVHGm5iDxDoABm/++dbKg==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-use-effect-event@0.0.5':
resolution: {integrity: sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==}
peerDependencies:
@@ -2399,6 +2504,15 @@ packages:
'@types/react':
optional: true
'@radix-ui/react-use-size@1.1.5':
resolution: {integrity: sha512-V1McDQkMGzgivwqdu7u96APs7oi0Jvj9LTzgq3WWrDZqxWdAqU9yZnZQqk5OizGFR8badUQwZsrlao7MOlWYOA==}
peerDependencies:
'@types/react': '*'
react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
peerDependenciesMeta:
'@types/react':
optional: true
'@radix-ui/react-visually-hidden@1.2.11':
resolution: {integrity: sha512-NFS86RYYZb4/exihaESBGOpMJFz8MGLAfu3mOBSGByVnVPC9JPASfYubxd/8KbkQK0sYAv8lVQDEQukDX/qXvQ==}
peerDependencies:
@@ -3327,8 +3441,8 @@ packages:
react:
optional: true
'@vector-im/compound-web@10.5.0':
resolution: {integrity: sha512-dcxIAKtTKBLKz2Y83mNkXyYx3shtSs80KvdGKN5ryFvo6OnVOhHPEHiQNbaPQ0EDjc6xStjY9+oz2Fh4c+kniQ==}
'@vector-im/compound-web@10.6.0':
resolution: {integrity: sha512-MNALzWkuo17qo6FWMvtqvkdGizkPzTeYp8J3yF+ZF2020jBxEVo9WLWNNBNig3K1inBMbSKQwxgOgu9Db6u6Sg==}
peerDependencies:
'@fontsource/inconsolata': ^5
'@fontsource/inter': ^5
@@ -4758,7 +4872,7 @@ packages:
resolution: {integrity: sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==}
matrix-js-sdk@https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/6c8b1b418189919bc69fd9df5e57354e7b3c39cb:
resolution: {gitHosted: true, tarball: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/6c8b1b418189919bc69fd9df5e57354e7b3c39cb}
resolution: {gitHosted: true, integrity: sha512-wKP5LDUeHlussA80SizNnzqU2ZspXJlq6TmDbDEUJPcjF9MbydYXqMy5LsquK8XtuNJTKyvGRxkL6GEEYmo+qQ==, tarball: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/6c8b1b418189919bc69fd9df5e57354e7b3c39cb}
version: 45.1.0
engines: {node: '>=22.0.0'}
@@ -5507,9 +5621,6 @@ packages:
require-main-filename@2.0.0:
resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==}
reselect@5.3.0:
resolution: {integrity: sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg==}
resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}
@@ -5791,8 +5902,8 @@ packages:
symbol-tree@3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
tabbable@6.5.0:
resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==}
tabbable@6.5.2:
resolution: {integrity: sha512-XgdnB1nGU6KU4VgMnZPaZCx7M1hBrLyEiZYau2G2gq9UT0d7d4FUBlNX7vvPlm/B1vk1PjrzJBx9Lbv4fsqS9g==}
terser@5.46.1:
resolution: {integrity: sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==}
@@ -6465,29 +6576,6 @@ snapshots:
'@babel/helper-string-parser': 7.29.7
'@babel/helper-validator-identifier': 7.29.7
'@base-ui/react@1.9.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@babel/runtime': 8.0.8
'@base-ui/utils': 0.5.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@floating-ui/react-dom': 2.1.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@floating-ui/utils': 0.2.12
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
use-sync-external-store: 1.7.0(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@base-ui/utils@0.5.0(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@babel/runtime': 8.0.8
'@floating-ui/utils': 0.2.12
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
reselect: 5.3.0
use-sync-external-store: 1.7.0(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@bcoe/v8-coverage@1.0.2': {}
'@blazediff/core@1.9.1': {}
@@ -6989,7 +7077,7 @@ snapshots:
'@floating-ui/utils': 0.2.12
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
tabbable: 6.5.0
tabbable: 6.5.2
'@floating-ui/utils@0.2.12': {}
@@ -7736,9 +7824,11 @@ snapshots:
'@radix-ui/primitive@1.1.7': {}
'@radix-ui/react-arrow@1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/primitive@1.2.0': {}
'@radix-ui/react-arrow@1.1.17(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
@@ -7757,19 +7847,32 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-collection@1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.5.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-compose-refs@1.1.5(@types/react@19.2.18)(react@19.2.8)':
dependencies:
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-context-menu@2.3.7(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-context-menu@2.4.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-menu': 2.1.24(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.2.6(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-menu': 2.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.3.0(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
@@ -7782,6 +7885,12 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-context@1.3.0(@types/react@19.2.18)(react@19.2.8)':
dependencies:
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-dialog@1.1.23(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
@@ -7811,6 +7920,12 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-direction@1.2.0(@types/react@19.2.18)(react@19.2.8)':
dependencies:
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-dismissable-layer@1.1.19(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
@@ -7824,15 +7939,28 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-dropdown-menu@2.1.24(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-dismissable-layer@1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-effect-event': 0.0.5(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-dropdown-menu@2.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-id': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-menu': 2.1.24(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.2.6(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-menu': 2.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.3.0(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
@@ -7845,6 +7973,12 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-focus-guards@1.2.0(@types/react@19.2.18)(react@19.2.8)':
dependencies:
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-focus-scope@1.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
@@ -7856,14 +7990,25 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-form@0.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-focus-scope@1.3.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.5(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-form@0.3.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-id': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-label': 2.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-label': 2.1.17(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
@@ -7877,33 +8022,33 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-label@2.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-label@2.1.17(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-menu@2.1.24(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-menu@2.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
'@radix-ui/react-collection': 1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-collection': 1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-direction': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-dismissable-layer': 1.1.19(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-focus-guards': 1.1.6(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-focus-scope': 1.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-direction': 1.2.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-dismissable-layer': 1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-focus-guards': 1.2.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-focus-scope': 1.3.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-id': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-popper': 1.3.7(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-portal': 1.1.17(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-presence': 1.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-roving-focus': 1.1.19(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.3.3(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-popper': 1.4.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-portal': 1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-presence': 1.1.11(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-roving-focus': 1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.5.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.5(@types/react@19.2.18)(react@19.2.8)
aria-hidden: 1.2.6
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
@@ -7912,17 +8057,17 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-popper@1.3.7(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-popper@1.4.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@floating-ui/react-dom': 2.1.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-arrow': 1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-arrow': 1.1.17(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-rect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-size': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-size': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/rect': 1.1.3
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
@@ -7940,6 +8085,16 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-portal@1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-presence@1.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
@@ -7949,6 +8104,15 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-presence@1.1.11(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-primitive@2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-slot': 1.3.3(@types/react@19.2.18)(react@19.2.8)
@@ -7958,27 +8122,36 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-progress@1.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-primitive@2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.5.0(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-roving-focus@1.1.19(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-progress@1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
'@radix-ui/react-collection': 1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-roving-focus@1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-collection': 1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.2.2(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-direction': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-direction': 1.2.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-id': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.4(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.2.6(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-use-callback-ref': 1.1.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-controllable-state': 1.3.0(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-is-hydrated': 0.1.3(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
@@ -7987,9 +8160,9 @@ snapshots:
'@types/react': 19.2.18
'@types/react-dom': 19.2.5(@types/react@19.2.18)
'@radix-ui/react-separator@1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@radix-ui/react-separator@1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-primitive': 2.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
react: 19.2.8
react-dom: 19.2.8(react@19.2.8)
optionalDependencies:
@@ -8022,12 +8195,26 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-slot@1.5.0(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/react-compose-refs': 1.1.5(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-callback-ref@1.1.4(@types/react@19.2.18)(react@19.2.8)':
dependencies:
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-callback-ref@1.1.5(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-controllable-state@1.2.6(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.1.7
@@ -8037,6 +8224,15 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-controllable-state@1.3.0(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/primitive': 1.2.0
'@radix-ui/react-use-effect-event': 0.0.5(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-effect-event@0.0.5(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
@@ -8076,6 +8272,13 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-use-size@1.1.5(@types/react@19.2.18)(react@19.2.8)':
dependencies:
'@radix-ui/react-use-layout-effect': 1.1.4(@types/react@19.2.18)(react@19.2.8)
react: 19.2.8
optionalDependencies:
'@types/react': 19.2.18
'@radix-ui/react-visually-hidden@1.2.11(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@radix-ui/react-primitive': 2.1.10(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
@@ -8901,18 +9104,18 @@ snapshots:
'@types/react': 19.2.18
react: 19.2.8
'@vector-im/compound-web@10.5.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.2.18)(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
'@vector-im/compound-web@10.6.0(@fontsource/inconsolata@5.3.0)(@fontsource/inter@5.3.0)(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(@vector-im/compound-design-tokens@11.3.1(@types/react@19.2.18)(react@19.2.8))(react-dom@19.2.8(react@19.2.8))(react@19.2.8)':
dependencies:
'@floating-ui/react': 0.27.20(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@floating-ui/react-dom': 2.1.9(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@fontsource/inconsolata': 5.3.0
'@fontsource/inter': 5.3.0
'@radix-ui/react-context-menu': 2.3.7(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-dropdown-menu': 2.1.24(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-form': 0.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-progress': 1.1.16(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-separator': 1.1.15(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.3.3(@types/react@19.2.18)(react@19.2.8)
'@radix-ui/react-context-menu': 2.4.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-dropdown-menu': 2.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-form': 0.3.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-progress': 1.2.1(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-separator': 1.2.0(@types/react-dom@19.2.5(@types/react@19.2.18))(@types/react@19.2.18)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
'@radix-ui/react-slot': 1.5.0(@types/react@19.2.18)(react@19.2.8)
'@vector-im/compound-design-tokens': 11.3.1(@types/react@19.2.18)(react@19.2.8)
classnames: 2.5.1
react: 19.2.8
@@ -11366,8 +11569,6 @@ snapshots:
require-main-filename@2.0.0: {}
reselect@5.3.0: {}
resolve-from@4.0.0: {}
resolve@1.22.12:
@@ -11692,7 +11893,7 @@ snapshots:
symbol-tree@3.2.4: {}
tabbable@6.5.0: {}
tabbable@6.5.2: {}
terser@5.46.1:
dependencies:
+4 -1
View File
@@ -132,7 +132,10 @@ upstream paused until then. A lobby that wants them earlier captures them with
hands the media to `join()` as `publish`: the tracks are moved, not shared — they
leave the lobby's `tracks$`, their objects are finished, and the backend
publishes the very same device tracks and the processor already running on them,
so nothing is captured or initialised again at the join. The upstream flows
so nothing is captured or initialised again at the join. Given the media quality
the join is given, it opens the camera at the resolution the backend captures
at, so that a join through a lobby publishes what a join without one does. The
upstream flows
exactly while the membership is `joined`: a sync outage pauses it, and `leave()`
pauses it for good and sends the leave.
+195 -17
View File
@@ -13,7 +13,7 @@ import { type LocalVideoMediaTrack, type VideoProcessor } from "./media-api";
describe("createLocalMedia", () => {
it("opens the microphone and the camera in one request", async () => {
const getUserMedia = fakeGetUserMedia();
const media = createLocalMedia(getUserMedia);
const media = createLocalMedia({ getUserMedia });
const tracks = await media.capture([
{ source: "microphone", deviceId: "mic" },
@@ -24,7 +24,7 @@ describe("createLocalMedia", () => {
]);
expect(getUserMedia).toHaveBeenCalledExactlyOnceWith({
audio: { deviceId: "mic" },
audio: { deviceId: { exact: "mic" } },
video: { width: 640, height: 480, frameRate: undefined },
});
expect(tracks.map((t) => t.source)).toEqual(["microphone", "camera"]);
@@ -35,9 +35,34 @@ describe("createLocalMedia", () => {
]);
});
it("opens a camera asked for without a resolution at the one a backend captures at", async () => {
const getUserMedia = fakeGetUserMedia();
const media = createLocalMedia({ getUserMedia });
await media.capture([{ source: "camera" }]);
expect(getUserMedia).toHaveBeenCalledExactlyOnceWith({
video: { width: 1280, height: 720, frameRate: 30 },
});
});
it("opens the camera at the resolution of the media quality it is given", async () => {
const getUserMedia = fakeGetUserMedia();
const media = createLocalMedia({
mediaQuality: { video: { max_resolution: 360 } },
getUserMedia,
});
await media.capture([{ source: "camera" }]);
expect(getUserMedia).toHaveBeenCalledExactlyOnceWith({
video: { width: 640, height: 360, frameRate: 20 },
});
});
it("joins an identical capture still in flight rather than opening the devices again", async () => {
const getUserMedia = fakeGetUserMedia();
const media = createLocalMedia(getUserMedia);
const media = createLocalMedia({ getUserMedia });
const requests = [{ source: "camera" as const }];
const [first, second] = await Promise.all([
@@ -52,7 +77,7 @@ describe("createLocalMedia", () => {
it("shows the processor's output, initialised once", async () => {
const processor = fakeProcessor();
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
const [camera] = await media.capture([{ source: "camera", processor }]);
const element = document.createElement("video");
@@ -65,7 +90,7 @@ describe("createLocalMedia", () => {
it("hands the tracks over as they are: no second capture, no second init", async () => {
const getUserMedia = fakeGetUserMedia();
const processor = fakeProcessor();
const media = createLocalMedia(getUserMedia);
const media = createLocalMedia({ getUserMedia });
const [microphone, camera] = await media.capture([
{ source: "microphone" },
{ source: "camera", processor },
@@ -76,7 +101,7 @@ describe("createLocalMedia", () => {
expect(taken.get("microphone")?.track).toBe(trackBehind(microphone));
expect(taken.get("camera")).toEqual({
track: trackBehind(camera),
constraints: {},
constraints: at720p(),
muted: false,
processor: { processor, processedTrack: processor.output },
});
@@ -89,7 +114,7 @@ describe("createLocalMedia", () => {
});
it("finishes a handed-over track", async () => {
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
const [camera] = await media.capture([{ source: "camera" }]);
const element = document.createElement("video");
camera.attach(element);
@@ -102,7 +127,7 @@ describe("createLocalMedia", () => {
});
it("mutes by disabling the track and hands the mute over", async () => {
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
const [microphone] = await media.capture([{ source: "microphone" }]);
await expect(microphone.setEnabled(false)).resolves.toBe(false);
@@ -115,7 +140,7 @@ describe("createLocalMedia", () => {
it("switches the device by opening it anew", async () => {
const getUserMedia = fakeGetUserMedia();
const processor = fakeProcessor();
const media = createLocalMedia(getUserMedia);
const media = createLocalMedia({ getUserMedia });
const [camera] = await media.capture([{ source: "camera", processor }]);
const first = trackBehind(camera);
const element = document.createElement("video");
@@ -124,7 +149,7 @@ describe("createLocalMedia", () => {
await camera.setDevice("other");
expect(getUserMedia).toHaveBeenLastCalledWith({
video: { deviceId: "other" },
video: at720p({ deviceId: { exact: "other" } }),
});
expect(first.stop).toHaveBeenCalled();
expect(processor.restart).toHaveBeenCalledOnce();
@@ -132,14 +157,140 @@ describe("createLocalMedia", () => {
expect(restartedOn).not.toBe(first);
expect(input).toBe(vi.mocked(processor.init).mock.calls[0][1]);
expect(tracksOn(element)).toEqual([processor.output]);
expect(media.takeTracks().get("camera")?.constraints).toEqual({
deviceId: "other",
expect(media.takeTracks().get("camera")?.constraints).toEqual(
at720p({ deviceId: { exact: "other" } }),
);
});
it.each([
{
gone: ["mic"],
audio: { deviceId: { ideal: "mic" } },
video: at720p({ deviceId: { exact: "cam" } }),
},
{
gone: ["cam"],
audio: { deviceId: { exact: "mic" } },
video: at720p({ deviceId: { ideal: "cam" } }),
},
{
gone: ["mic", "cam"],
audio: { deviceId: { ideal: "mic" } },
video: at720p({ deviceId: { ideal: "cam" } }),
},
])(
"lets only a device that is gone off the one asked for: $gone",
async ({ gone, audio, video }) => {
const getUserMedia = without(gone, fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia });
const tracks = await media.capture([
{ source: "microphone", deviceId: "mic" },
{ source: "camera", deviceId: "cam" },
]);
expect(getUserMedia).toHaveBeenLastCalledWith({ audio, video });
expect(tracks.map((t) => t.source)).toEqual(["microphone", "camera"]);
},
);
it("asks twice for a single device that is gone", async () => {
const getUserMedia = without(["cam"], fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia });
await media.capture([{ source: "camera", deviceId: "cam" }]);
expect(vi.mocked(getUserMedia).mock.calls).toEqual([
[{ video: at720p({ deviceId: { exact: "cam" } }) }],
[{ video: at720p({ deviceId: { ideal: "cam" } }) }],
]);
});
it("hands over the device that opened in place of the one that is gone", async () => {
const getUserMedia = without(
["cam"],
fakeGetUserMedia({ deviceId: "built-in" }),
);
const media = createLocalMedia({ getUserMedia });
await media.capture([{ source: "camera", deviceId: "cam" }]);
expect(media.takeTracks().get("camera")?.constraints).toEqual(
at720p({ deviceId: { exact: "built-in" } }),
);
});
it("takes a refusal that is not an Error for a device that is gone", async () => {
const getUserMedia = vi.mocked(fakeGetUserMedia());
getUserMedia.mockRejectedValueOnce({ name: "OverconstrainedError" });
const media = createLocalMedia({ getUserMedia });
await media.capture([{ source: "camera", deviceId: "cam" }]);
expect(getUserMedia).toHaveBeenLastCalledWith({
video: at720p({ deviceId: { ideal: "cam" } }),
});
});
it("does not ask again where the device is there and refused", async () => {
const getUserMedia = vi.mocked(fakeGetUserMedia());
const denied = Object.assign(new Error(), { name: "NotAllowedError" });
getUserMedia.mockRejectedValueOnce(denied);
const media = createLocalMedia({ getUserMedia });
await expect(
media.capture([{ source: "camera", deviceId: "cam" }]),
).rejects.toBe(denied);
expect(getUserMedia).toHaveBeenCalledOnce();
});
it("rejects where no device opens at all", async () => {
const refusal = overconstrained();
const media = createLocalMedia({
getUserMedia: vi.fn().mockRejectedValue(refusal),
});
await expect(
media.capture([{ source: "camera", deviceId: "cam" }]),
).rejects.toBe(refusal);
});
it("keeps the camera it has where another cannot be opened", async () => {
const getUserMedia = vi.mocked(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia });
const [camera] = await media.capture([
{ source: "camera", deviceId: "cam" },
]);
const first = trackBehind(camera);
getUserMedia.mockRejectedValueOnce(overconstrained());
await expect(camera.setDevice("unplugged")).rejects.toThrow();
expect(first.stop).not.toHaveBeenCalled();
expect(media.takeTracks().get("camera")).toMatchObject({
track: first,
constraints: { deviceId: { exact: "cam" } },
});
});
it("lets go of the device it was opened on to face the other way", async () => {
const getUserMedia = fakeGetUserMedia({ facingMode: "user" });
const media = createLocalMedia({ getUserMedia });
const [camera] = (await media.capture([
{ source: "camera", deviceId: "front" },
])) as [LocalVideoMediaTrack];
await camera.switchFacingMode();
expect(getUserMedia).toHaveBeenLastCalledWith({
video: at720p({ facingMode: "environment" }),
});
});
it("reports the facing mode and switches it", async () => {
const getUserMedia = fakeGetUserMedia({ facingMode: "user" });
const media = createLocalMedia(getUserMedia);
const media = createLocalMedia({ getUserMedia });
const [camera] = (await media.capture([{ source: "camera" }])) as [
LocalVideoMediaTrack,
];
@@ -148,13 +299,13 @@ describe("createLocalMedia", () => {
await camera.switchFacingMode();
expect(getUserMedia).toHaveBeenLastCalledWith({
video: { facingMode: "environment" },
video: at720p({ facingMode: "environment" }),
});
});
// As the built-in camera of a Mac
it("takes a camera that doesn't say which way it faces to face the user", async () => {
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
const [camera] = (await media.capture([{ source: "camera" }])) as [
LocalVideoMediaTrack,
];
@@ -162,7 +313,7 @@ describe("createLocalMedia", () => {
});
it("releases one device and stops the rest", async () => {
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
const [microphone, camera] = await media.capture([
{ source: "microphone" },
{ source: "camera" },
@@ -179,7 +330,7 @@ describe("createLocalMedia", () => {
});
it("refuses a screen share", async () => {
const media = createLocalMedia(fakeGetUserMedia());
const media = createLocalMedia({ getUserMedia: fakeGetUserMedia() });
await expect(media.capture([{ source: "screenShare" }])).rejects.toThrow(
"screen share",
);
@@ -227,6 +378,33 @@ function fakeGetUserMedia(videoSettings?: MediaTrackSettings): GetUserMedia {
});
}
/** Camera constraints with the resolution a request without one is opened at. */
function at720p(
constraints: MediaTrackConstraints = {},
): MediaTrackConstraints {
return { ...constraints, width: 1280, height: 720, frameRate: 30 };
}
/** A browser these devices are unplugged from: asked for one of them exactly, it refuses. */
function without(gone: string[], getUserMedia: GetUserMedia): GetUserMedia {
return vi.fn(async (constraints: MediaStreamConstraints) => {
for (const wanted of [constraints.audio, constraints.video]) {
const deviceId = typeof wanted === "object" ? wanted.deviceId : undefined;
const exact =
typeof deviceId === "object" && !Array.isArray(deviceId)
? deviceId.exact
: undefined;
if (typeof exact === "string" && gone.includes(exact))
throw overconstrained();
}
return getUserMedia(constraints);
});
}
function overconstrained(): Error {
return Object.assign(new Error("deviceId"), { name: "OverconstrainedError" });
}
function fakeProcessor(): VideoProcessor & { output: MediaStreamTrack } {
const output = fakeTrack("video");
return {
+138 -24
View File
@@ -7,6 +7,11 @@ Please see LICENSE in the repository root for full details.
import { BehaviorSubject, type Observable, of } from "rxjs";
import {
cameraCaptureResolution,
type CaptureResolution,
type MediaQuality,
} from "./config";
import { MatrixRTCError } from "./errors";
import {
type HandedOverTrack,
@@ -28,15 +33,28 @@ export type GetUserMedia = (
constraints: MediaStreamConstraints,
) => Promise<MediaStream>;
export interface LocalMediaOptions {
/**
* The media quality the join is given. A camera asked for without a
* resolution is opened at the one this means, as the backend opens it at
* the join; left to the browser it would be published at a lower one.
*/
mediaQuality?: MediaQuality;
/** In place of the browser's, for a test. */
getUserMedia?: GetUserMedia;
}
/**
* Local media on the browser's devices alone, for a lobby ahead of a join:
* no backend is involved, so whichever backend joins can take the tracks
* over. Activity and level are not measured; stats are none.
*/
export function createLocalMedia(
getUserMedia: GetUserMedia = async (constraints) =>
export function createLocalMedia({
mediaQuality,
getUserMedia = async (constraints) =>
navigator.mediaDevices.getUserMedia(constraints),
): LocalMedia {
}: LocalMediaOptions = {}): LocalMedia {
const cameraResolution = cameraCaptureResolution(mediaQuality);
const capturedTracks = new Map<Source, CapturedTrack>();
const requests = new Map<Source, Request>();
const tracks$ = new BehaviorSubject<
@@ -78,11 +96,14 @@ export function createLocalMedia(
);
bySource.set(request.source, request);
}
const constraints: MediaStreamConstraints = {};
for (const request of bySource.values())
constraints[request.source === "microphone" ? "audio" : "video"] =
trackConstraints(request);
const stream = await getUserMedia(constraints);
const { stream, constraints } = await open(getUserMedia, {
microphone: bySource.has("microphone")
? trackConstraints(bySource.get("microphone")!, cameraResolution)
: undefined,
camera: bySource.has("camera")
? trackConstraints(bySource.get("camera")!, cameraResolution)
: undefined,
});
const captured: CapturedTrack[] = [];
for (const track of stream.getTracks()) {
const source: Source = track.kind === "audio" ? "microphone" : "camera";
@@ -91,7 +112,7 @@ export function createLocalMedia(
const captured_ = new CapturedTrack(
source,
track,
trackConstraints(request),
constraints[source]!,
getUserMedia,
);
capturedTracks.set(source, captured_);
@@ -139,18 +160,86 @@ export function createLocalMedia(
};
}
type SourceConstraints = Partial<Record<Source, MediaTrackConstraints>>;
/**
* Opens the devices asked for. Where one of them is gone, as a remembered
* choice that was unplugged, that source opens on another device and the
* other source keeps the device picked: an exact request for a device that no
* longer exists would otherwise open nothing.
*/
async function open(
getUserMedia: GetUserMedia,
constraints: SourceConstraints,
): Promise<{ stream: MediaStream; constraints: SourceConstraints }> {
let refusal: unknown;
for (const attempt of attempts(constraints)) {
try {
const stream = await getUserMedia({
...(attempt.microphone && { audio: attempt.microphone }),
...(attempt.camera && { video: attempt.camera }),
});
return { stream, constraints: attempt };
} catch (e) {
if (!isOverconstrained(e)) throw e;
refusal ??= e;
}
}
throw refusal;
}
/**
* As asked, then with one source let off its device, then both: the refusal
* does not say which of the two devices is gone.
*/
function attempts(wanted: SourceConstraints): SourceConstraints[] {
const { microphone, camera } = wanted;
const camera_ = camera && relaxed(camera);
const microphone_ = microphone && relaxed(microphone);
return [
wanted,
...(camera_ ? [{ ...wanted, camera: camera_ }] : []),
...(microphone_ ? [{ ...wanted, microphone: microphone_ }] : []),
...(camera_ && microphone_
? [{ microphone: microphone_, camera: camera_ }]
: []),
];
}
/** The same request with its device preferred, not required; nothing where it requires none. */
function relaxed(
constraints: MediaTrackConstraints,
): MediaTrackConstraints | undefined {
const { deviceId } = constraints;
if (typeof deviceId !== "object" || Array.isArray(deviceId)) return undefined;
if (deviceId.exact === undefined) return undefined;
return { ...constraints, deviceId: { ideal: deviceId.exact } };
}
/** By name: the refusal is not an `Error` in every browser. */
function isOverconstrained(e: unknown): boolean {
return (e as { name?: unknown } | null)?.name === "OverconstrainedError";
}
/** The constraints a request means to the browser. */
function trackConstraints(request: Request): MediaTrackConstraints {
const device = request.deviceId && { deviceId: request.deviceId };
function trackConstraints(
request: Request,
cameraResolution: CaptureResolution,
): MediaTrackConstraints {
// THE FIX for "cannot switch cameras in Chrome" (#4479), first capture.
// `exact` makes the browser open this device or fail. A plain
// `deviceId: "abc"` is only a wish, and Chromium ignores the wish and
// opens its default device.
const device = request.deviceId && {
deviceId: { exact: request.deviceId },
};
if (request.source === "microphone") return { ...device, ...request.capture };
const resolution = request.capture?.resolution;
const resolution = request.capture?.resolution ?? cameraResolution;
return {
...device,
...(resolution && {
width: resolution.width,
height: resolution.height,
frameRate: resolution.frameRate,
}),
width: resolution.width,
height: resolution.height,
frameRate: resolution.frameRate,
};
}
@@ -184,7 +273,12 @@ class CapturedTrack {
// The device actually in use, so that a backend asked for it again
// recognises it rather than restarting the track
const { deviceId } = track.getSettings();
const constraints = { ...this.constraints, ...(deviceId && { deviceId }) };
// `exact` here too: the call reopens the camera with these constraints
// after a mute, and must get the same device again, not the default one
const constraints = {
...this.constraints,
...(deviceId && { deviceId: { exact: deviceId } }),
};
this.finish();
return { track, constraints, muted: this.muted$.value, processor };
}
@@ -245,12 +339,28 @@ class CapturedTrack {
for (const element of this.elements) play(element, this.shown());
}
private async reacquire(constraints: MediaTrackConstraints): Promise<void> {
/**
* Replace the current with the one from the selector. On fail, keep current.
*
* The old `deviceId` and `facingMode` are removed before the new selector
* is applied. This is needed because we use `exact` device ids: if the old
* exact id stayed, asking for a new facing mode could not leave the deviceId.
* "flip camera" would do nothing.
*/
private async reacquire(
selector: Pick<MediaTrackConstraints, "deviceId" | "facingMode">,
): Promise<void> {
this.live();
this.constraints = { ...this.constraints, ...constraints };
const stream = await this.getUserMedia({
[this.track.kind]: this.constraints,
});
const constraints = {
...this.constraints,
// One selects the device at a time: a facing mode cannot move a track
// off a device it is pinned to
deviceId: undefined,
facingMode: undefined,
...selector,
};
const stream = await this.getUserMedia({ [this.track.kind]: constraints });
this.constraints = constraints;
this.track.stop();
this.track = stream.getTracks()[0];
this.track.enabled = !this.muted$.value;
@@ -288,7 +398,11 @@ class CapturedTrack {
},
setDevice: async (deviceId: string): Promise<void> => {
if (this.track.getSettings().deviceId === deviceId) return;
await this.reacquire({ deviceId });
// THE FIX for "cannot switch cameras in Chrome" (#4479), switching in
// the lobby. With a plain `{ deviceId }` Chromium reopened the same
// camera, so the preview only flashed. `exact` opens the one picked,
// or rejects and leaves the current camera running.
await this.reacquire({ deviceId: { exact: deviceId } });
},
};
if (this.source === "microphone")
+34
View File
@@ -99,3 +99,37 @@ export const defaultMediaQuality = {
max_framerate: 30,
},
} as const satisfies MediaQuality;
export interface CaptureResolution {
width: number;
height: number;
frameRate: number;
}
/**
* What a camera is captured at for a media quality. A lobby that opens the
* camera ahead of the join asks for this, so that the track it hands over is
* the one the backend would have captured.
*/
export function cameraCaptureResolution(
mediaQuality?: MediaQuality,
): CaptureResolution {
const height =
mediaQuality?.video?.max_resolution ??
defaultMediaQuality.video.max_resolution;
return (
captureResolutions.find((resolution) => height <= resolution.height) ??
captureResolutions.at(-1)!
);
}
/** Lowest first; a height between two takes the higher. */
const captureResolutions: CaptureResolution[] = [
{ width: 320, height: 180, frameRate: 20 },
{ width: 640, height: 360, frameRate: 20 },
{ width: 960, height: 540, frameRate: 25 },
{ width: 1280, height: 720, frameRate: 30 },
{ width: 1920, height: 1080, frameRate: 30 },
{ width: 2560, height: 1440, frameRate: 30 },
{ width: 3840, height: 2160, frameRate: 30 },
];
+4 -1
View File
@@ -143,7 +143,10 @@ export interface LocalMediaTrack {
* from the request where the device could not be used.
*/
setEnabled(enabled: boolean): Promise<boolean>;
/** Captures from another device. Rejects for a screen share, which has none. */
/**
* Captures from another device. Rejects where that device cannot be opened,
* leaving the track on the one it had, and for a screen share, which has none.
*/
setDevice(deviceId: string): Promise<void>;
}
@@ -213,7 +213,7 @@ describe("createLivekitMediaTrack", () => {
expect(switchActiveDevice).toHaveBeenCalledWith(
"audioinput",
"mic-2",
false,
true,
);
});
@@ -225,19 +225,23 @@ describe("createLivekitMediaTrack", () => {
])(
"leaves a processed camera alone unless its device changes: $deviceId",
async ({ deviceId, switches }) => {
let openDevice = "cam-1";
const camera = Object.assign(Object.create(LocalVideoTrack.prototype), {
source: Track.Source.Camera,
_mediaStreamTrack: {
readyState: "live",
label: "",
getSettings: () => ({ deviceId: "cam-1" }),
getSettings: () => ({ deviceId: openDevice }),
},
// What LiveKit shows as the track, with no device of its own
processor: {
processedTrack: { label: "", getSettings: () => ({}) },
},
}) as LocalVideoTrack;
const switchActiveDevice = vi.fn().mockResolvedValue(true);
const switchActiveDevice = vi.fn(async (_kind: string, id: string) => {
openDevice = id;
return Promise.resolve(true);
});
const { participant, publication, room } = fakes({
track: camera as unknown as FakeTrack,
});
@@ -253,11 +257,63 @@ describe("createLivekitMediaTrack", () => {
await track.setDevice(deviceId);
expect(switchActiveDevice.mock.calls).toEqual(
switches ? [["videoinput", deviceId, false]] : [],
switches ? [["videoinput", deviceId, true]] : [],
);
},
);
it("rejects where the camera did not move to the device asked for, and returns to the one it had", async () => {
const switchActiveDevice = vi.fn().mockResolvedValue(true);
const track = localCameraOn(scope, "cam-1", switchActiveDevice);
await expect(track.setDevice("cam-2")).rejects.toThrow("another device");
expect(switchActiveDevice.mock.calls).toEqual([
["videoinput", "cam-2", true],
["videoinput", "cam-1", true],
]);
});
it("returns to the device it had where the one asked for does not open", async () => {
const gone = new Error("gone");
const switchActiveDevice = vi
.fn()
.mockRejectedValueOnce(gone)
.mockResolvedValue(true);
const track = localCameraOn(scope, "cam-1", switchActiveDevice);
await expect(track.setDevice("cam-2")).rejects.toBe(gone);
expect(switchActiveDevice).toHaveBeenLastCalledWith(
"videoinput",
"cam-1",
true,
);
});
it("reports the switch that failed where the return fails too", async () => {
const gone = new Error("gone");
const switchActiveDevice = vi
.fn()
.mockRejectedValueOnce(gone)
.mockRejectedValue(new Error("busy"));
const track = localCameraOn(scope, "cam-1", switchActiveDevice);
await expect(track.setDevice("cam-2")).rejects.toBe(gone);
});
// It is stopped, and opens the device LiveKit remembers on turning on
it("does not return a camera that is off to its device", async () => {
const switchActiveDevice = vi.fn().mockRejectedValue(new Error("gone"));
const track = localCameraOn(scope, "cam-1", switchActiveDevice, {
isMuted: true,
});
await expect(track.setDevice("cam-2")).rejects.toThrow("gone");
expect(switchActiveDevice).toHaveBeenCalledOnce();
});
it("takes the facing mode of a processed camera from the camera", async () => {
const source = {
readyState: "live",
@@ -356,6 +412,36 @@ function fakeTrack(): FakeTrack {
}) as FakeTrack;
}
/** Our own camera, open on a device, in a room whose device switch the test decides. */
function localCameraOn(
scope: ObservableScope,
deviceId: string,
switchActiveDevice: LivekitRoom["switchActiveDevice"],
state: { isMuted?: boolean } = {},
): LocalVideoMediaTrack {
const camera = Object.assign(Object.create(LocalVideoTrack.prototype), {
source: Track.Source.Camera,
_mediaStreamTrack: {
readyState: "live",
label: "",
getSettings: () => ({ deviceId }),
},
...state,
}) as LocalVideoTrack;
const { participant, publication, room } = fakes({
track: camera as unknown as FakeTrack,
});
return createLocalLivekitMediaTrack(
scope,
Object.assign(participant, {
isLocal: true,
}) as unknown as LocalParticipant,
publication as unknown as TrackPublication,
Object.assign(room, { switchActiveDevice }),
vi.fn(),
) as LocalVideoMediaTrack;
}
function fakes({
track = fakeTrack(),
kind = Track.Kind.Video,
@@ -203,16 +203,35 @@ export function createLocalLivekitMediaTrack(
// of the camera track itself: with a processor on, LiveKit's media
// stream track is the processed one, which names no device
const current = publication.track;
if (
current instanceof LocalTrack &&
(await current.getDeviceId(false)) === deviceId
)
return;
await room.switchActiveDevice(
base.kind === "audio" ? "audioinput" : "videoinput",
deviceId,
false,
);
const previous =
current instanceof LocalTrack
? await current.getDeviceId(false)
: undefined;
if (previous === deviceId) return;
const kind = base.kind === "audio" ? "audioinput" : "videoinput";
try {
// Exact: asked for as a preference, the browser may open another
// device that fits the rest of the constraints better
await room.switchActiveDevice(kind, deviceId, true);
// A check that the switch really happened, so that a failure is an
// error and not silence. Asked of the track again rather than taken
// from LiveKit's answer, which compares against the processed track
// too. A muted track is stopped and takes the device on turning on again
const deviceNow = await openDevice(publication.track);
if (deviceNow !== undefined && deviceNow !== deviceId)
throw new MatrixRTCError(
`The ${base.source} is on another device than the one asked for`,
);
} catch (e) {
// LiveKit stops the track before it opens the device asked for, so a
// switch that fails leaves nothing running
if (previous !== undefined && !isMuted(publication.track))
// The failed switch is the error to report, not this one
await room
.switchActiveDevice(kind, previous, true)
.catch(() => undefined);
throw e;
}
},
};
if (base.kind === "audio") return { ...base, ...local };
@@ -254,6 +273,19 @@ export function createLocalLivekitMediaTrack(
};
}
/** The device a local track captures from; none while it is muted. */
async function openDevice(
track: Track | undefined,
): Promise<string | undefined> {
return track instanceof LocalTrack && !isMuted(track)
? track.getDeviceId(false)
: undefined;
}
function isMuted(track: Track | undefined): boolean {
return track instanceof LocalTrack && track.isMuted;
}
/** The track behind a publication; a remote one arrives on subscription. */
function publicationTrack$(
scope: ObservableScope,
@@ -8,6 +8,7 @@ Please see LICENSE in the repository root for full details.
import { describe, expect, it } from "vitest";
import { VideoPresets, type VideoPreset } from "livekit-client";
import { cameraCaptureResolution } from "../../config";
import { buildLiveKitOptions } from "./livekitOptions";
describe("buildLiveKitOptions", () => {
@@ -108,6 +109,33 @@ describe("buildLiveKitOptions", () => {
}
});
it.each([
undefined,
90,
180,
240,
360,
480,
540,
720,
1080,
1440,
2160,
4320,
])(
"captures at what a lobby opens the camera at ahead of the join: %s",
(height) => {
const mediaQuality =
height === undefined
? undefined
: { video: { max_resolution: height } };
expect(
buildLiveKitOptions(mediaQuality).videoCaptureDefaults?.resolution,
).toMatchObject(cameraCaptureResolution(mediaQuality));
},
);
it("screen share layers fall back to max_framerate, then 30", () => {
const fromMax = buildLiveKitOptions({
screen_share: {
-57
View File
@@ -1,57 +0,0 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
.popover {
position: relative;
border-radius: var(--cpd-space-3x);
background: var(--cpd-color-bg-canvas-default);
box-shadow: var(--big-drop-shadow);
padding: var(--cpd-space-5x);
box-sizing: border-box;
inline-size: 310px;
max-inline-size: 90vw;
/* Draw an internal border */
&::after {
content: "";
position: absolute;
inset: 0;
border: var(--cpd-border-width-1) solid
var(--cpd-color-border-interactive-secondary);
border-radius: inherit;
pointer-events: none;
}
transition:
opacity 180ms,
transform 180ms;
&[data-starting-style] {
opacity: 0;
@media (prefers-reduced-motion: no-preference) {
transform: translate(0, var(--cpd-space-3x));
}
}
&[data-ending-style] {
transition-duration: 110ms;
opacity: 0;
@media (prefers-reduced-motion: no-preference) {
transform: translate(0, var(--cpd-space-2x));
}
}
p {
font: var(--cpd-font-body-sm-regular);
color: var(--cpd-color-text-secondary);
margin-block-end: var(--cpd-space-4x);
}
}
.title {
margin-block-end: var(--cpd-space-2x);
}
-41
View File
@@ -1,41 +0,0 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import type { Meta, StoryObj } from "@storybook/react-vite";
import { Popover } from "./Popover";
import { Button } from "@vector-im/compound-web";
import { VideoCallOffSolidIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
import { useState } from "react";
const meta = {
component: Popover,
} satisfies Meta<typeof Popover>;
export default meta;
export const Default: StoryObj = {
render: () => {
const [open, setOpen] = useState(true);
return (
<Popover
title="Poor network connection"
trigger={<Button>Open popover</Button>}
open={open}
onOpenChange={setOpen}
>
<p>Turn off all videos to improve call performance.</p>
<Button
size="md"
Icon={VideoCallOffSolidIcon}
style={{ width: "100%", marginBlockStart: 24 }}
>
Turn off all videos
</Button>
</Popover>
);
},
};
-30
View File
@@ -1,30 +0,0 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { expect, test } from "vitest";
import { axe } from "vitest-axe";
import { render, screen } from "@testing-library/react";
import { Popover } from "./Popover";
test("Popover renders", async () => {
render(
<Popover
title="Example"
trigger={<button>Open popover</button>}
open
onOpenChange={() => {}}
>
<p>This is an example of a popover.</p>
</Popover>,
);
const button = screen.getByRole("button", { name: "Open popover" });
const popover = screen.getByRole("dialog", { name: "Example" });
expect(button).toMatchSnapshot("button");
expect(popover).toMatchSnapshot("popover");
expect(await axe(document.body)).toHaveNoViolations();
});
-87
View File
@@ -1,87 +0,0 @@
/*
Copyright 2026 Element Creations Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { type FC, type ReactElement, type ReactNode } from "react";
import { Popover as BUIPopover } from "@base-ui/react/popover";
import styles from "./Popover.module.css";
import { Heading } from "@vector-im/compound-web";
import classNames from "classnames";
export interface PopoverProps {
/**
* The popover title.
*/
title: string;
/**
* The button that opens the popover. This must be a component that accepts a
* ref and spreads props.
*
* https://base-ui.com/react/handbook/composition
*/
trigger: ReactElement;
/**
* Whether the popover is open.
*/
open: boolean;
/**
* Event handler called when the user tries to open or close the popover.
*/
onOpenChange: (open: boolean) => void;
/**
* The popover contents.
*/
children: ReactNode;
className?: string;
/**
* The side of the trigger on which to place the popover. Note that the menu
* may still end up on a different side than the one you request if there
* isn't enough space.
* @default bottom
*/
side?: "top" | "bottom" | "left" | "right" | "inline-end" | "inline-start";
/**
* The edge along which the popover and trigger will be aligned.
* @default center
*/
align?: "start" | "center" | "end";
}
/**
* A popover opened by pressing a button.
*/
export const Popover: FC<PopoverProps> = ({
title,
trigger,
open,
onOpenChange,
children,
className,
side,
align,
}) => {
return (
<BUIPopover.Root open={open} onOpenChange={onOpenChange}>
<BUIPopover.Trigger render={trigger} />
<BUIPopover.Portal>
<BUIPopover.Positioner sideOffset={8} side={side} align={align}>
<BUIPopover.Popup className={classNames(styles.popover, className)}>
<BUIPopover.Title
className={styles.title}
render={
<Heading as="h3" type="body" weight="semibold" size="lg">
{title}
</Heading>
}
/>
{children}
</BUIPopover.Popup>
</BUIPopover.Positioner>
</BUIPopover.Portal>
</BUIPopover.Root>
);
};
-40
View File
@@ -1,40 +0,0 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Popover renders > button 1`] = `
<button
aria-controls="_r_0_"
aria-expanded="true"
aria-haspopup="dialog"
data-base-ui-click-trigger=""
data-popup-open=""
id="base-ui-_r_1_"
tabindex="0"
type="button"
>
Open popover
</button>
`;
exports[`Popover renders > popover 1`] = `
<div
aria-labelledby="base-ui-_r_4_"
class="_popover_8e8188"
data-align="center"
data-base-ui-focusable=""
data-open=""
data-side="bottom"
id="_r_0_"
role="dialog"
tabindex="-1"
>
<h3
class="_typography_6v6n8_153 _font-body-lg-semibold_6v6n8_74 _title_8e8188"
id="base-ui-_r_4_"
>
Example
</h3>
<p>
This is an example of a popover.
</p>
</div>
`;
@@ -432,7 +432,7 @@ exports[`InCallView > rendering > renders 1`] = `
</div>
<fieldset
aria-label="Layout"
class="_toggle_1t5ha_9 _layout_20b7b4"
class="_toggle_1kvhc_9 _layout_20b7b4"
data-size="lg"
>
<input
+105
View File
@@ -169,6 +169,111 @@ describe("MuteState", () => {
expect(syncingValues).toContain(true);
expect(syncingValues.at(-1)).toBe(false);
});
// The bug from issue #4403: we join a call without a lobby, and the browser
// tells us about the camera only after the call has started.
// 1. Start with no camera, with the camera set to be on by default.
// 2. Set a handler, like the call does when it starts.
// 3. The camera shows up.
// The handler must be called with "on", so the call publishes the camera,
// and the button must show "on" only after the handler is done.
//
// What it guards: the button and the real camera must never disagree. In
// the bug the button jumped to "on" by itself and nobody told the call, so
// the other side saw "Waiting for media". If someone changes how the
// default is applied and forgets the handler again, this test fails.
test("asks the handler for the default of a device listed after it was set", async () => {
const available$ = new BehaviorSubject(new Map<string, DeviceLabel>());
const muteState = new MuteState(
testScope,
aDevice(available$),
true,
constant(false),
);
const handler = vi.fn(async (desired: boolean) => Promise.resolve(desired));
muteState.setHandler(handler);
expect(muteState.enabled$.value).toBe(false);
available$.next(aCamera);
// On only once the handler has acted on it
expect(muteState.enabled$.value).toBe(false);
await flushPromises();
expect(handler).toHaveBeenLastCalledWith(true);
expect(muteState.enabled$.value).toBe(true);
expect(muteState.syncing$.value).toBe(false);
});
// A camera that is unplugged and plugged back in during a call.
// 1. Start with a camera, on by default, and set a handler.
// 2. The camera goes away, then comes back.
// The handler is told "off" when the camera goes away and is not called
// again. The camera stays off: we must not turn on a camera that the user
// may have turned off before.
//
// What it guards: a privacy problem the fix for #4403 could cause. The fix
// sends the default "on" to the handler. If it did that every time a
// camera shows up, replugging a camera (or leaving earpiece mode) would
// start sending video without the user asking. This test fails if the
// default is ever applied a second time during a call.
test("leaves a device that comes back under a handler off", async () => {
const available$ = new BehaviorSubject(aCamera);
const muteState = new MuteState(
testScope,
aDevice(available$),
true,
constant(false),
);
expect(muteState.enabled$.value).toBe(true);
const handler = vi.fn(async (desired: boolean) => Promise.resolve(desired));
muteState.setHandler(handler);
available$.next(new Map());
available$.next(aCamera);
await flushPromises();
expect(handler.mock.calls).toEqual([[false]]);
expect(muteState.enabled$.value).toBe(false);
});
// The lobby case, which must keep working as before: no handler is set.
// 1. Start with no camera, with the camera set to be on by default.
// 2. The camera shows up.
// The button shows "on" right away, with no waiting.
//
// What it guards: the lobby and the join read the button's value at once
// to decide which devices to open. If the fix for #4403 made the default
// wait for a handler here too, the value would be "off" for a moment and
// the lobby would open no camera. This test fails if that happens.
test("assumes the default at once where no handler is set", () => {
const available$ = new BehaviorSubject(new Map<string, DeviceLabel>());
const muteState = new MuteState(
testScope,
aDevice(available$),
true,
constant(false),
);
available$.next(aCamera);
expect(muteState.enabled$.value).toBe(true);
});
// A device list with one camera in it.
const aCamera = new Map<string, DeviceLabel>([
["fbac11", { type: "name", name: "HD Camera" }],
]);
// A fake camera whose device list the test can change while it runs.
function aDevice(
available$: BehaviorSubject<Map<string, DeviceLabel>>,
): MediaDevice<DeviceLabel, SelectedDevice> {
return {
available$,
selected$: constant({ id: "fbac11" }),
select(): void {},
} as unknown as MediaDevice<DeviceLabel, SelectedDevice>;
}
});
describe("MuteStates", () => {
+26 -10
View File
@@ -53,6 +53,8 @@ export class MuteState<Label, Selected> {
this.handler$.next(defaultHandler);
}
private devicesConnectedBefore = false;
private readonly canControlDevices$ = combineLatest([
this.device.available$,
this.forceMute$,
@@ -86,15 +88,26 @@ export class MuteState<Label, Selected> {
};
}
// Assume the default value only once devices are actually connected
let enabled = this.enabledByDefault;
// defaultHander = no-op hanlder = "no actual device handler available"
const handlerAttached = this.handler$.value !== defaultHandler;
const deviceCameBackInCall =
handlerAttached && this.devicesConnectedBefore;
// Set the flag. A marker, that we reached this code before.
this.devicesConnectedBefore = true;
const initialWanted = deviceCameBackInCall
? false
: this.enabledByDefault;
// With a handler attached we start off and let the sync below actually call
// the handler, so the switch shows "on" only once the track is really there.
// Without one (lobby) enabled = initialWanted -> no call to handler.
let enabled = handlerAttached ? false : initialWanted;
const set$ = new Subject<boolean>();
const toggle$ = new Subject<void>();
const syncing$ = new BehaviorSubject(false);
const desired$ = merge(set$, toggle$.pipe(map(() => !enabled)));
const enabled$ = new Observable<boolean>((subscriber) => {
subscriber.next(enabled);
let latestDesired = this.enabledByDefault;
let latestDesired = initialWanted;
const sync = async (): Promise<void> => {
if (enabled === latestDesired) {
@@ -120,16 +133,19 @@ export class MuteState<Label, Selected> {
}
};
const startSync = (): void => {
syncing$.next(true);
sync().catch((err) => {
// TODO: better error handling
logger.error("MuteState: handler error", err);
});
};
const s = desired$.subscribe((desired) => {
latestDesired = desired;
if (syncing$.value === false) {
syncing$.next(true);
sync().catch((err) => {
// TODO: better error handling
logger.error("MuteState: handler error", err);
});
}
if (syncing$.value === false) startSync();
});
if (enabled !== latestDesired) startSync();
return (): void => {
s.unsubscribe();
syncing$.complete();
+4 -1
View File
@@ -111,7 +111,10 @@ Please see LICENSE in the repository root for full details.
display: flex;
gap: var(--cpd-space-2x);
position: absolute;
inset-block-end: var(--cpd-space-1x);
/* Ensure that the buttons lie within the safe area */
inset-block-end: calc(
var(--call-view-safe-area-inset-bottom, 0px) + var(--cpd-space-1x)
);
inset-inline-end: var(--cpd-space-1x);
z-index: 1;
}
+6 -1
View File
@@ -8,6 +8,7 @@ Please see LICENSE in the repository root for full details.
import { useEffect } from "react";
import { createLocalMedia, type LocalMedia } from "@element-hq/matrixrtc-sdk";
import { Config } from "./config/Config";
import { useInitial } from "./useInitial";
/**
@@ -15,7 +16,11 @@ import { useInitial } from "./useInitial";
* the component where the join never comes.
*/
export function useLocalMedia(): LocalMedia {
const media = useInitial(() => createLocalMedia());
const media = useInitial(() =>
// The quality the join is given, so that a camera opened in the lobby has
// the same resolution as one opened by a join without a lobby.
createLocalMedia({ mediaQuality: Config.get().media_quality }),
);
useEffect(() => (): void => media.stop(), [media]);
return media;
}
+1
View File
@@ -101,6 +101,7 @@ describe("widget", () => {
EventType.CallSDPStreamMetadataChangedPrefix,
EventType.CallReplaces,
EventType.CallEncryptionKeysPrefix,
"m.rtc.encryption_key",
];
expect(createRoomWidgetClientSpy.mock.calls[0][1]).toStrictEqual({
+1
View File
@@ -163,6 +163,7 @@ export const initializeWidget = (
EventType.CallSDPStreamMetadataChangedPrefix,
EventType.CallReplaces,
EventType.CallEncryptionKeysPrefix,
"m.rtc.encryption_key",
];
const client = createRoomWidgetClient(
+1
View File
@@ -133,6 +133,7 @@ export default defineConfig(({ mode }) => {
"matrix-js-sdk/lib/models/relations-container",
"matrix-js-sdk/lib/models/room",
"matrix-js-sdk/lib/models/room-state",
"matrix-js-sdk/lib/models/room-sticky-events",
"matrix-js-sdk/lib/models/typed-event-emitter",
"matrix-js-sdk/lib/randomstring",
"matrix-js-sdk/lib/sync",
+1
View File
@@ -54,6 +54,7 @@ export default defineConfig(({ mode }) => {
"matrix-js-sdk/lib/models/relations-container",
"matrix-js-sdk/lib/models/room",
"matrix-js-sdk/lib/models/room-state",
"matrix-js-sdk/lib/models/room-sticky-events",
"matrix-js-sdk/lib/models/typed-event-emitter",
"matrix-js-sdk/lib/randomstring",
"matrix-js-sdk/lib/sync",