feat(call): native WASAPI system-audio for screen-share (Windows)

Hooks the custom screen-share picker up to a native WASAPI loopback
capture so "Mit System-Sound" no longer falls back to the OS picker on
Windows. Rust side opens the default render endpoint, channels 48 kHz
f32 stereo to an AudioWorklet, which feeds a MediaStreamDestination for
LiveKit to publish as ScreenShareAudio. Ring buffer sized for latency
(80 ms target, drop-to-target on overflow) and the AudioContext is
resumed eagerly so initial burstiness can't pile up.

Adds a temporary attachTrack:audio diagnostic log to confirm source
tagging matches between old and new clients.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
byGalax
2026-04-22 23:03:15 +02:00
parent e2e8217b86
commit 665f450878
7 changed files with 827 additions and 21 deletions
@@ -282,14 +282,6 @@ export function ScreenSourcePicker({ open, onClose, onStart }: Props) {
</span>
</label>
</div>
{includeAudio && selectedId && (
<p className="rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-700 dark:text-amber-300">
{t('app:call.share_audio_uses_os_picker', {
defaultValue:
'Mit System-Sound fragt der Browser noch einmal nach der Quelle — Video-Direktpfad geht nur ohne Audio.',
})}
</p>
)}
{error && (
<p role="alert" className="text-xs text-rose-600 dark:text-rose-300">
{error}