Spotlight: switch between cameras as well as screenshares during a share #67

Closed
opened 2026-11-07 21:47:57 -05:00 by jared · 0 comments
Owner

Request

During a call, when more than one person is screensharing, the spotlight lets you flip between their shares with the back/forward arrows (and the dots under it). People like this a lot. Extend it to cameras: while someone is screensharing, you should be able to flip between the share(s) and people's cameras in the same spotlight, the same way.

Requested by Jared, 2026-11-07. Not started; this issue is only a plan.

How it works today

  • During a screenshare, overrideSpotlight$ in src/lotus/lotusSpotlight.ts returns spotlight: screenShares, so the carousel holds only screenshares. The one exception is a host pin (io.lotus.focus_participant, #4/#29), which appends that one camera.
  • src/tile/SpotlightTile.tsx renders media as the carousel: visibleId, onBackClick/forward, and the indicator dots (data-testid="screenshare-indicator", only shown when media.length > 1).
  • Cameras are otherwise only seen in the side grid or the PiP during a share.

Proposed behaviour

  • While at least one screenshare is active, the spotlight carousel holds: all screenshares first (as today), then cameras of participants whose video is on (videoEnabled$).
  • With no screenshare, nothing changes: speaker-follows spotlight as upstream.
  • The share stays the default view when a share starts. A camera never takes the spotlight unless the viewer flips to it.
  • If the camera being viewed is turned off or its owner leaves, fall back to the first screenshare. That's the same rule SpotlightTile already uses when a visible share disappears.
  • The host pin keeps working. The pinned camera just sits in the same list rather than being a special case. Check that it doesn't appear twice.
  • Each viewer's choice is their own (local UI state), as it is for screenshares today.

Open questions

  1. Own camera: should the local camera be in the list? Suggest no, since the PiP and the grid already show it.
  2. Order of cameras: by join order (stable), or active speaker first? Suggest a stable order, so the dots don't reshuffle while you're flipping.
  3. Dot count: with many cameras on, there could be a lot of dots. Cap them, or show a small "2 / 7" counter instead past some number?
  4. PiP: if you're viewing someone's camera in the spotlight and they're also the active speaker, hide the PiP as redundant (the #29 rule).
  5. Hotkeys: if lotusHotkeys.ts has (or gets) next/previous spotlight keys, they should cover cameras too.

Implementation notes

  • Keep it in src/lotus/lotusSpotlight.ts (the share branch of overrideSpotlight$), so CallViewModel stays close to upstream for rebases. It already gets userMedia$ and screenShares$. Filtering cameras needs each item's videoEnabled$ (combine them, as pinnedMedia$ does with speaking$).
  • SpotlightTile should mostly just work with mixed media, since it already takes MediaViewModel[]. Check the camera tile's sizing and fit inside the spotlight frame, and rename or extend the screenshare-indicator test id.
  • Bandwidth: a camera in the carousel that isn't visible shouldn't subscribe to high-quality video. Check how SpotlightTile and LiveKit adaptive stream treat off-screen carousel items (aria-hidden items) before adding several cameras.
  • Tests: extend lotusSpotlight.test.ts (shares then cameras, camera off or leave, pin not duplicated, no-share path unchanged) and SpotlightTile (indicator count, fall back when the visible camera goes away).

Related

#4, #29 (pin during a screenshare), #16/#30 (pin lifecycle), #38/#39 (screenshare tile). The Cinny side (CallEmbed.ts, [Gitea #43] screenshare and layout state) shouldn't need changes unless we expose this to the host.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA

## Request During a call, when more than one person is screensharing, the spotlight lets you flip between their shares with the back/forward arrows (and the dots under it). People like this a lot. Extend it to cameras: while someone is screensharing, you should be able to flip between the share(s) and people's cameras in the same spotlight, the same way. Requested by Jared, 2026-11-07. Not started; this issue is only a plan. ## How it works today - During a screenshare, `overrideSpotlight$` in `src/lotus/lotusSpotlight.ts` returns `spotlight: screenShares`, so the carousel holds **only** screenshares. The one exception is a host pin (`io.lotus.focus_participant`, #4/#29), which appends that one camera. - `src/tile/SpotlightTile.tsx` renders `media` as the carousel: `visibleId`, `onBackClick`/forward, and the indicator dots (`data-testid="screenshare-indicator"`, only shown when `media.length > 1`). - Cameras are otherwise only seen in the side grid or the PiP during a share. ## Proposed behaviour - While at least one screenshare is active, the spotlight carousel holds: **all screenshares first** (as today), then **cameras of participants whose video is on** (`videoEnabled$`). - With no screenshare, nothing changes: speaker-follows spotlight as upstream. - The share stays the default view when a share starts. A camera never takes the spotlight unless the viewer flips to it. - If the camera being viewed is turned off or its owner leaves, fall back to the first screenshare. That's the same rule `SpotlightTile` already uses when a visible share disappears. - The host pin keeps working. The pinned camera just sits in the same list rather than being a special case. Check that it doesn't appear twice. - Each viewer's choice is their own (local UI state), as it is for screenshares today. ## Open questions 1. **Own camera:** should the local camera be in the list? Suggest no, since the PiP and the grid already show it. 2. **Order of cameras:** by join order (stable), or active speaker first? Suggest a stable order, so the dots don't reshuffle while you're flipping. 3. **Dot count:** with many cameras on, there could be a lot of dots. Cap them, or show a small "2 / 7" counter instead past some number? 4. **PiP:** if you're viewing someone's camera in the spotlight and they're also the active speaker, hide the PiP as redundant (the #29 rule). 5. **Hotkeys:** if `lotusHotkeys.ts` has (or gets) next/previous spotlight keys, they should cover cameras too. ## Implementation notes - Keep it in `src/lotus/lotusSpotlight.ts` (the share branch of `overrideSpotlight$`), so `CallViewModel` stays close to upstream for rebases. It already gets `userMedia$` and `screenShares$`. Filtering cameras needs each item's `videoEnabled$` (combine them, as `pinnedMedia$` does with `speaking$`). - `SpotlightTile` should mostly just work with mixed media, since it already takes `MediaViewModel[]`. Check the camera tile's sizing and fit inside the spotlight frame, and rename or extend the `screenshare-indicator` test id. - Bandwidth: a camera in the carousel that isn't visible shouldn't subscribe to high-quality video. Check how `SpotlightTile` and LiveKit adaptive stream treat off-screen carousel items (`aria-hidden` items) before adding several cameras. - Tests: extend `lotusSpotlight.test.ts` (shares then cameras, camera off or leave, pin not duplicated, no-share path unchanged) and `SpotlightTile` (indicator count, fall back when the visible camera goes away). ## Related #4, #29 (pin during a screenshare), #16/#30 (pin lifecycle), #38/#39 (screenshare tile). The Cinny side (`CallEmbed.ts`, [Gitea #43] screenshare and layout state) shouldn't need changes unless we expose this to the host. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared closed this issue 2026-11-09 01:10:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/element-call#67