0

I am implementing video call in react native. I am using react-native-webrtc, socket.io and react-native-incall-manager npm packages. The issue, I am facing is remote user audio is not clear. The audio is not clear. to much noise. Can I fix this issue? Suggestions

I am looking to a solution where I can eliminate noise and clear the remote user voice.

mediaDevices.enumerateDevices().then(sourceInfos => {
      let videoSourceId;
      for (let i = 0; i < sourceInfos.length; i++) {
        const sourceInfo = sourceInfos[i];
        if (
          sourceInfo.kind == 'videoinput' &&
          sourceInfo.facing == (isFront ? 'front' : 'environment')
        ) {
          videoSourceId = sourceInfo.deviceId;
        }
      }
      mediaDevices
        .getUserMedia({
          audio: isMicOn,
          video: isVideoEnabled
            ? {
                width: 640,
                height: 480,
                frameRate: 30,
                facingMode: isFront ? 'user' : 'environment',
                deviceId: videoSourceId,
              }
            : false,
        })
        .then(stream => {
          console.log('stream=>', stream);
          InCallManager.start({media: 'audio'}); // audio/video, default: audio
          InCallManager.setForceSpeakerphoneOn(true);
          ChangeMyStream(stream);
          myStream_ = stream;
          console.log(
            'appointmentId==>',
            appointmentId,
            'myStream==>',
            myStream,
          );
          dispatch(
            JoinCall({appointmentId, myStream: stream, isRemoteUserCalling}),
          ); //todo: remove "1"
        })
        .catch(error => {
          console.error(error);
        });
    });
Ali Hassan
  • 71
  • 7

0 Answers0