jmcker / WebRTC-Audio-Stream-Example

Proof-of-concept work for streaming audio over a WebRTC connection (Socket.io signaling server)
MIT License
17 stars 8 forks source link

descktopCapture stream is mono #1

Open jmcker opened 5 years ago

jmcker commented 5 years ago

Stream received via navigator.mediaDevices.getUserMedia is mono (possibly with additional filtering).

Current constraints:

const mediaStreamConstraints = {
    audio: {
        mandatory: {
            chromeMediaSource: 'desktop',
            echoCancellation: false,
            googEchoCancellation: false,
            googAutoGainControl: false,
            googNoiseSuppression: false,
            googHighpassFilter: false,
            googTypingNoiseDetection: false,
            googAudioMirroring: false,
            googAudioMirroring: false,
            googNoiseReduction: false,
        }
    },
    video: {
        mandatory: {
            chromeMediaSource: 'desktop'
        }
    }
};

This could be a general limitation or related to: w3c/mediacapture-main#457

jmcker commented 5 years ago

This ended up being an issue with some part of how Chrome's was handling SDP settings on the actual WebRTC connection rather than the local stream. The commit here allows munging the SDP to force stereo.