1

i create audio chat with easyRTC But it have noise and it work bad when I use tablet and 3g internet ! But in computer I work true ! How i can change audio quality in easyRTC ?

mohammad
  • 275
  • 3
  • 16

2 Answers2

0

You should reduce quality of Video to improve audio quality. By default, easyRTC config Video quality with resolution of 1280x720. You could reconfig quality base on status of bandwidth or device and set quality on client side with:

easyrtc.setVideoDims(X, Y);

Given X and Y params are your intend res. You should refer the detailed of setVideoDims function on easyrtc client as bellow:

easyrtc.setVideoDims = function(width, height) {
    if (!width) {
        width = 1280;
        height = 720;
    }
    easyrtc.videoFeatures = {
        mandatory: {
            minWidth: width,
            minHeight: height,
            maxWidth: width,
            maxHeight: height
        },
        optional: []
    };
};
hoanganh17b
  • 867
  • 1
  • 11
  • 25
0

I was actually exploring this same issue for a recent project!

Here's something that worked for us.

(1) First, pass an echoCancellation configuration option into MediaTrackConstraints: https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/echoCancellation - this is the built-in echo cancellation feature available natively in most browsers as part of their WebRTC support.

(2) Mute any video element where sound isn't needed - I don't need to hear my own video projecting sound, only the other, remote, user does. This applies only if you're using some video (or similar-enough audio) html element.

(3) EasyRTC supports: https://easyrtc.com/docs/client-api/Easyrtc_Rates.php - there's an example of how that can be used here: https://demo.easyrtc.com/demos/demo_lowbandwidth.html - play around with the options and you'll likely find a use-case specific setting that works for your needs!

Edit: (3) provides actual codec settings for video and audio!

Hope that helps!

Adam Gerard
  • 708
  • 2
  • 8
  • 23