Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion app/components/Participant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,16 @@ export const Participant = forwardRef<
preferredRid
)
const audioTrack = isSelf ? userMedia.audioStreamTrack : pulledAudioTrack
// For your own screenshare there is no server echo to pull (Cloudflare
// Calls doesn't loop a track back to its sender), so pulledVideoTrack is
// always undefined and the tile renders empty. Use the local capture
// track for the self screenshare instead.
const videoTrack =
isSelf && !isScreenShare ? userMedia.videoStreamTrack : pulledVideoTrack
isSelf && !isScreenShare
? userMedia.videoStreamTrack
: isSelf && isScreenShare
? userMedia.screenShareVideoTrack
: pulledVideoTrack

useDeadPulledTrackMonitor(
user.tracks.video,
Expand Down
7 changes: 6 additions & 1 deletion app/hooks/useUserMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export const camera = getCamera({
broadcasting: true,
constraints: { width: { ideal: 1280 }, height: { ideal: 720 } },
})
export const screenshare = getScreenshare({ audio: false })
// audio: true → pass an audio constraint to getDisplayMedia so Chrome/Edge
// render the "Share tab audio" checkbox in the picker. This only affects
// the picker UI; the resulting track is NOT pushed through PartyTracks
// (nothing subscribes to screenshare.audio.broadcastTrack$), so no
// additional encrypted stream is created and E2EE is unaffected.
export const screenshare = getScreenshare({ audio: true })

function useNoiseSuppression() {
const [suppressNoise, setSuppressNoise] = useLocalStorage(
Expand Down