Skip to content

A voice client can announce several shared windows (GRYT-1905) - #343

Merged
grytchat merged 3 commits into
mainfrom
claude/GRYT-1905-screen-shares
Oct 26, 2026
Merged

grytchat merged 3 commits into
mainfrom
claude/GRYT-1905-screen-shares

Conversation

@grytchat

@grytchat grytchat commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Third piece of sharing several windows at once (GRYT-1905), after Gryt-chat/sfu#67 and Gryt-chat/voice#134.

  • voice:screen:state may carry shares: [{ videoStreamId, audioStreamId }]. screenSharesFrom reads it and keeps at most 8 entries, matching the SFU's ceiling. It drops anything that isn't an object with a string video id of up to 128 characters. A payload without shares gives the single pair older apps send, so nothing changes for them.
  • Clients get screenShares in both member-list builders in utils/clients.ts. screenShareVideoStreamID and screenShareAudioStreamID keep the first window, so an app that knows one share still shows one.
  • Every place that cleared the old two fields now clears screenShares too: leaving, moving, kicking, a replaced socket, server restart cleanup.
  • screenShares is optional on the type, so the many test fixtures that build a client record don't change.

Tests: utils/screenShares.test.ts covers the legacy pair, several windows, malformed input and the ceiling. It passes alongside the permission-gate and client-record tests (164).

screenShares is added to the public field list in publicClientList.test.ts, which pins what leaves the server. Every member already sees the single share's stream ids, and this is the same per window.

Not in this PR: the client sending shares and drawing a tile per window.

🤖 Generated with Claude Code

grytchat and others added 3 commits October 26, 2026 20:37
voice:screen:state may carry shares: [{videoStreamId, audioStreamId}], checked and capped at 8.
Clients get screenShares; the old single fields keep the first window for older apps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every member already sees the single share's stream ids; this is the same thing per window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grytchat
grytchat merged commit 91443a5 into main Oct 26, 2026
5 checks passed
@grytchat
grytchat deleted the claude/GRYT-1905-screen-shares branch October 26, 2026 20:00
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