Repository navigation
Show your own screenshare track and offer tab audio in the picker - #224
Open
MinitorMHS wants to merge 2 commits into
Open
MinitorMHS wants to merge 2 commits into
MinitorMHS wants to merge 2 commits into
Conversation
getScreenshare({ audio: false }) passes audio: undefined to
getDisplayMedia, so Chrome/Edge never render the "Share tab audio"
checkbox and tab/system audio cannot be shared at all.
Flip to audio: true so the constraint is actually requested. Picker UI
only: nothing subscribes to screenshare.audio.broadcastTrack$, so no
extra transceiver is created and the E2EE media path is untouched.
This is deliberately isolated from the earlier attempt (486be4e),
which coupled the same flag to pushing a second audio track through
PartyTracks.
For self + screenshare the tile read from pulledVideoTrack, but Cloudflare Calls never loops a track back to its sender, so that is always undefined and the tile renders empty. The other participants see the screen; the sharer sees nothing. Use the local capture track for the self screenshare tile, matching how the self webcam tile already uses userMedia.videoStreamTrack. Rendering only - no track is pushed, pulled, or re-encrypted, so the E2EE media path is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small screenshare fixes. They're unrelated in code but both affect the
screenshare path, so I'm putting them together to save a review round-trip —
happy to split if you prefer.
1. Your own screenshare tile renders empty
Problem
Cloudflare Calls doesn't loop a published track back to its sender, so
pulledVideoTrackis alwaysundefinedfor the self participant.Participantalready special-cases self for the camera, but the screenshare case fell
through to the pulled track and rendered nothing.
Change
Extend the self special-case to cover screenshares, using the local capture
track:
screenShareVideoTrackis anuseObservableAsValueofscreenshare.video.broadcastTrack$, mirroring the existing camera case.2. No way to share tab audio
Problem
getScreenshare({ audio: false })callsgetDisplayMediawithout an audioconstraint, so Chrome and Edge don't render the "Share tab audio" checkbox.
Change
Pass
audio: truetogetScreenshare.Notes on E2EE and stream counts
Neither change adds a stream to the room or affects MLS.
uses for self — it's what you captured, not a decrypted remote stream.
track isn't published — nothing subscribes to the screenshare audio
broadcast track — so sender stream counts are unchanged.
Actually publishing screenshare audio would be a separate change: it adds an
MLStream per sender, and the MLS group has to be reconfigured when a sender's
stream count changes.