Skip to content

[RW-26023] Screen share PIP layout and focus preservation#11

Merged
robinandeer merged 1 commit intomainfrom
03-26--rw-26023-screen-share-pip-layout-and-focus-preservation
Mar 26, 2026
Merged

[RW-26023] Screen share PIP layout and focus preservation#11
robinandeer merged 1 commit intomainfrom
03-26--rw-26023-screen-share-pip-layout-and-focus-preservation

Conversation

@robinandeer
Copy link
Copy Markdown
Collaborator

@robinandeer robinandeer commented Mar 26, 2026

Problem

When screen sharing, the shared screen overlays and completely hides the avatar video. Also, starting a screen share or switching to a different tab steals browser focus away from the app.

Refs RW-26023

Solution

  • Screen share content fills the main area while the avatar shrinks to a PIP in the bottom-left corner (user camera stays bottom-right)
  • Browser focus stays on the app tab when starting or switching a screen share, using CaptureController.setFocusBehavior("no-focus-change") (Chrome 109+, graceful fallback elsewhere)
  • Surface switching picker is enabled so users can change what they're sharing without stopping/restarting

How to test

  1. Start a call in examples/nextjs/
  2. Click screen share → pick a tab
  3. Verify: browser stays on the app tab (doesn't switch to the shared tab)
  4. Verify: shared screen fills the main area, avatar appears as a small PIP in the bottom-left
  5. Click "Present something else" in the browser chrome to switch sources without stopping the share

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
avatars-playground Ready Ready Preview, Comment Mar 26, 2026 7:14pm

Request Review

Copy link
Copy Markdown
Collaborator Author

robinandeer commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator Author

robinandeer commented Mar 26, 2026

Merge activity

  • Mar 26, 7:13 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 26, 7:14 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 26, 7:15 PM UTC: @robinandeer merged this pull request with Graphite.

@robinandeer robinandeer changed the base branch from 03-26--rw-26023-add-screen-share-button-to-control-bar-and-quickstart-example to graphite-base/11 March 26, 2026 19:13
@robinandeer robinandeer changed the base branch from graphite-base/11 to main March 26, 2026 19:13
@robinandeer robinandeer force-pushed the 03-26--rw-26023-screen-share-pip-layout-and-focus-preservation branch from 952d970 to 543620e Compare March 26, 2026 19:14
@robinandeer robinandeer merged commit 618b25e into main Mar 26, 2026
6 checks passed
@robinandeer robinandeer deleted the 03-26--rw-26023-screen-share-pip-layout-and-focus-preservation branch March 26, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant