Hi I have an issue basically I'm sending a stereo audio with WebRTC this way
const audioStream = await navigator.mediaDevices.getUserMedia({
audio: {
autoGainControl: false,
channelCount: 2,
echoCancellation: false,
latency: 0,
noiseSuppression: false,
sampleRate: 48000,
sampleSize: 16,
volume: 1.0,
},
video: false,
});
If i check the number of channels I have 2 channels getAudioTracks()[0].getSettings().channelCount
If I check the description I'm sending I have 2 channels
a=rtpmap:111 opus/48000/2
If check the description I'm receiving I have 2 channels.
But The stream I'm receiving has only one channel
connection.ontrack = ({ streams: [stream] }) => {
audio.srcObject = stream;
console.log(stream.getAudioTracks()[0].getSettings().channelCount); // =1
};
I don't understand what's going on.
You can try it yourself here