I have implemented a video chat application using peerjs module everything is okay , but not getting a good audio quality .
How to use sdpTransform for setting the bitrate. can anyone please give a complete example of sdpTranform in PeerJS.
Maybe you can try this,
let videoConstraints = {
height: { min: 640, ideal: 1920, max: 1920 },
width: { min: 400, ideal: 1080 },
frameRate: { max: 30 }
};
let audioConstraints = {
channelCount: 1,
sampleRate: <YOUR VALUE>,
sampleSize: <YOUR VALUE>,
volume: 1,
latency: 0.003,
echoCancellation: true,
noiseSuppression: true,
autoGainControl: true,
};
constraints = { audio: audioConstraints, video: videoConstraints };
Usage,
navigator.mediaDevices
.getUserMedia(constraints)
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.