Echo and noise in sound webRTC android

前端 未结 3 1296
天命终不由人
天命终不由人 2020-12-20 16:48

I am working on webRTC i am doing live stream between two android devices on local network it is working pretty fine for me except the sound quality issue there is noise and

3条回答
  •  忘掉有多难
    2020-12-20 17:21

    What's happening is that you are playing your own local audio back to yourself. This creates a feedback loop between your microphone and speakers. That's why it kinda sounds better when you have the hands-free device. You can remove the local audio by modifying the stream of getUserMedia():

    var constraints = {video: true, audio: true};
    getUserMedia(constraints, function(stream){
        var videoOnly = new MediaStream(stream.getVideoTracks());
    }, errorHandler);
    

提交回复
热议问题