Repository navigation
Share tab audio when screen sharing in meetings - #180
Merged
Merged
Conversation
Meeting screen share now asks the picker for tab/system audio and publishes it as stereo music with DTX off. Meeting audio elements are keyed per track so a presenter's mic and shared audio no longer overwrite each other; moderation and disconnect cleanup cover both.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
Meeting screen share sent video only, so a shared tab's sound never reached the room. Also, a peer's meeting audio elements were keyed by identity. A presenter's mic and screen-share audio would overwrite each other, so turning the mic off could cut the shared audio.
Behavior
The share picker now offers Also share tab audio (and system audio for a whole screen in Chrome). When ticked, everyone in the meeting hears it. The presenter still hears the tab locally. Local mute/block silences a peer's shared audio as well as their mic.
Implementation
RoomVideo.setScreenShareEnabled(true)passes capture options to LiveKit (audio with voice processing off,systemAudio: 'include',suppressLocalAudioPlayback: false) and publish options (128 kbps,dtx: false,forceStereo: true). LiveKit publishes the audio asScreenShareAudioand unpublishes it with the video.TrackSinksattach/detach now receive thetrackSid. The meeting room keys audio elements per track; moderation and participant-disconnect cleanup look up the owner viadataset.identity. World and stage rooms are unchanged.Verification
npx vitest run src/media/livekit.room.test.ts src/media/livekit.stage.test.ts src/media/livekit.world.test.ts: 27/27 passed, including new tests for capture/publish options, independent mic vs shared-audio detach, and moderation of bothtsc --noEmiton app and test configs: exit 0; eslint on touched files: exit 0