feat(spotlight): flip between cameras as well as screenshares during a share (#67)
CI / Build embedded bundle (push) Skipped
CI / Build embedded bundle (pull_request) Successful in 4m14s
CI / Publish to Gitea npm registry (pull_request) Skipped

During a screenshare the spotlight carousel now holds the shares first,
then the host-pinned camera (as before), then every other remote camera
that is on, in join order. Viewers use the same arrows/dots as between
shares. With no share nothing changes (upstream speaker-follows).

SpotlightTile gets a small lotus hook that keeps the share as the
default view when a share starts and falls back to the first item when
the visible camera turns off or its owner leaves (the IntersectionObserver
alone leaves visibleId stale when the target is already in view).
Indicator dots get data-kind so tests can tell shares from cameras.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
2026-11-09 01:05:41 -05:00
co-authored by Claude Opus 5.5
parent 576c80a989
commit 8ffd63bd65
7 changed files with 367 additions and 15 deletions
+12 -6
View File
@@ -71,8 +71,9 @@ widgetTest("Sharing screen in group call", async ({ addUser, browserName }) => {
.locator('iframe[title="Element Call"]')
.contentFrame();
// Expect 4 (3 + screen share) video tiles
await expect(frame.locator("video")).toHaveCount(4, {
// Expect 6 video tiles: 3 cameras in the grid, plus the spotlight
// carousel's screen share and the 2 remote cameras (lotus #67)
await expect(frame.locator("video")).toHaveCount(6, {
timeout: 5000,
});
@@ -112,8 +113,9 @@ widgetTest("Sharing screen in group call", async ({ addUser, browserName }) => {
.locator('iframe[title="Element Call"]')
.contentFrame();
// Expect 5 (2 + screen share) video tiles
await expect(frame.locator("video")).toHaveCount(5, {
// Expect 7 video tiles: 3 cameras in the grid, plus the spotlight
// carousel's 2 screen shares and 2 remote cameras (lotus #67)
await expect(frame.locator("video")).toHaveCount(7, {
timeout: 5000,
});
@@ -121,8 +123,12 @@ widgetTest("Sharing screen in group call", async ({ addUser, browserName }) => {
frame.locator('video[data-lk-source="screen_share"]'),
).toHaveCount(2);
// Expect 2 indicators at the bottom
await expect(frame.getByTestId("screenshare-indicator")).toHaveCount(2);
// Expect 4 indicators at the bottom: the 2 shares first, then the 2
// remote cameras (lotus #67)
await expect(frame.getByTestId("screenshare-indicator")).toHaveCount(4);
await expect(
frame.locator('[data-testid="screenshare-indicator"][data-kind="user"]'),
).toHaveCount(2);
// Check the first indicator is visible
await expect(