Merge pull request #120 from Monadical-SAS/jose/fix-audio-quality

Fix bad audio quality
This commit is contained in:
Jose
2023-08-08 09:01:00 -05:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -97,7 +97,11 @@ export default function Recorder(props) {
document.getElementById("play-btn").disabled = false; document.getElementById("play-btn").disabled = false;
} else { } else {
const stream = await navigator.mediaDevices.getUserMedia({ const stream = await navigator.mediaDevices.getUserMedia({
audio: { deviceId }, audio: {
deviceId,
noiseSuppression: false,
echoCancellation: false,
},
}); });
await record.startRecording(stream); await record.startRecording(stream);
props.setStream(stream); props.setStream(stream);

View File

@@ -2,7 +2,8 @@ import { useEffect, useState } from "react";
import Peer from "simple-peer"; import Peer from "simple-peer";
// allow customization of the WebRTC server URL from env // allow customization of the WebRTC server URL from env
const WEBRTC_SERVER_URL = process.env.NEXT_PUBLIC_WEBRTC_SERVER_URL || "http://127.0.0.1:1250/offer"; const WEBRTC_SERVER_URL =
process.env.NEXT_PUBLIC_WEBRTC_SERVER_URL || "http://127.0.0.1:1250/offer";
const useWebRTC = (stream) => { const useWebRTC = (stream) => {
const [data, setData] = useState({ const [data, setData] = useState({