fix: disable browser DSP on screen share audio and harden ICE stats resolution
Screen share audio was muffled/gated because getDisplayMedia used plain `audio: true`, letting the browser apply voice-optimized DSP (NS, AEC, AGC) to desktop audio. Now passes explicit constraints disabling all processing and requesting stereo capture. Also improves WebRTC stats: three-tier ICE candidate-pair discovery (transport → active-bytes heuristic → legacy fallback), height-based simulcast layer inference, and documents mDNS obfuscation limitation.
This commit is contained in:
@@ -121,7 +121,12 @@ export async function startScreenShare(room: Room): Promise<boolean> {
|
||||
|
||||
try {
|
||||
const track = await room.localParticipant.setScreenShareEnabled(true, {
|
||||
audio: true,
|
||||
audio: {
|
||||
echoCancellation: false,
|
||||
noiseSuppression: false,
|
||||
autoGainControl: false,
|
||||
channelCount: 2,
|
||||
},
|
||||
resolution: { width: opts.capture.width, height: opts.capture.height },
|
||||
// @ts-ignore — LiveKit accepts frameRate at capture level
|
||||
frameRate: opts.capture.frameRate,
|
||||
|
||||
Reference in New Issue
Block a user