Skip to content

Share tab audio when screen sharing - #227

Merged
Anuraj-dev merged 2 commits into
mainfrom
feat/call-screen-share-audio
Oct 22, 2026
Merged

Anuraj-dev merged 2 commits into
mainfrom
feat/call-screen-share-audio

Conversation

@Anuraj-dev

Copy link
Copy Markdown
Owner

Problem

Screen share sent video only. Sharing a tab with a video or music meant the room saw it but heard nothing.

Behavior

The share picker now offers Also share tab audio (and system audio for a whole screen in Chrome). When ticked, everyone in the call hears it. The presenter still hears the tab locally. Leaving it unticked gives the same video-only share as before.

Implementation

  • useMediasoup.shareScreen requests display audio with echo cancellation, noise suppression and AGC off. A picked audio track is produced as a second source: 'screen' producer (stereo Opus, 128 kbps, FEC on, DTX off). Stopping the share closes both producers. If the audio produce fails, the share continues video-only.
  • Server is unchanged: screen-source producers are already excluded from active-speaker detection and host mute, and the per-peer producer cap already allows mic + camera + screen video + screen audio.
  • RemoteAudio plays each remote screen stream that carries audio, at master volume (not the presenter's mic slider). The stage share tile is now always muted so the audio is not played twice and does not depend on layout or pinning.

Verification

  • npm run typecheck (shared, server, client, bot): exit 0
  • client npx vitest run: 260/260 passed, including new tests for audio produce, video-only fallback, failed audio produce, and RemoteAudio playback/volume
  • eslint on touched files: exit 0
  • Not verified in a real browser: the native display picker cannot be automated.

The screen-share picker now offers tab/system audio. When picked, it is produced as a second 'screen' producer (stereo Opus, 128 kbps, DTX off, no voice processing) and played by RemoteAudio at master volume. Video-only shares and failed audio produces fall back to a video-only share.
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
a-meet Ready Ready Preview Oct 22, 2026 7:40am UTC

@Anuraj-dev
Anuraj-dev merged commit 30ec032 into main Oct 22, 2026
15 checks passed

This branch was successfully deployed

1 active deployment
Preview — ad3e1e2e Deployed Oct 22, 2026 by vercel[bot]
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