Skip to content

fix: Automatically switch to spotlight if remote screenshare#3601

Merged
BillCarsonFr merged 2 commits intolivekitfrom
valere/fix_switch_spotlight_screenshare
Dec 1, 2025
Merged

fix: Automatically switch to spotlight if remote screenshare#3601
BillCarsonFr merged 2 commits intolivekitfrom
valere/fix_switch_spotlight_screenshare

Conversation

@BillCarsonFr
Copy link
Copy Markdown
Member

fixes #3588

Not sure when it did regress, the main change is to make gridModeUserSelection$ emit an initial value (changed it from Subject, to BehaviorSubject`).

If it is no initial value, gridMode$ is directly set to grid without doing the switchmap in the chain that is checking the current screenShare state in order to override the userChoise to spotlight when there is a screen share.

The test for that behavior was skipped, it is now enabled again

});
});

it.skip("screen sharing activates spotlight layout", () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wow this was actually skipped so we even had a test for that regression. This is super nice to see!

);

const gridModeUserSelection$ = new Subject<GridMode>();
const gridModeUserSelection$ = new BehaviorSubject<GridMode>("grid");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while at it can we move

const setGridMode = (value: ..

right next to the BehaviorSubject?

Copy link
Copy Markdown
Member

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me 👍 , more readable now too!

@BillCarsonFr BillCarsonFr added the PR-Bug-Fix Release note category. A PR that fixes a bug. label Dec 1, 2025
@BillCarsonFr BillCarsonFr merged commit 7fd4424 into livekit Dec 1, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bug-Fix Release note category. A PR that fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Starting to screenshare does not always switch to spotlight

3 participants