From 17e76541eb7edfa3871626d0911c7e3436575969 Mon Sep 17 00:00:00 2001 From: fan-droide Date: Wed, 3 May 2023 13:27:58 +0200 Subject: [PATCH 1/2] improve audio quality for recording example --- dist/waveform-playlist/js/record.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/waveform-playlist/js/record.js b/dist/waveform-playlist/js/record.js index 5b833401..c1dd94c3 100644 --- a/dist/waveform-playlist/js/record.js +++ b/dist/waveform-playlist/js/record.js @@ -1,6 +1,6 @@ var userMediaStream; var playlist; -var constraints = { audio: true }; +var constraints = { audio: { echoCancellation: false, noiseSuppression: false, autoGainControl: false } }; navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || @@ -39,8 +39,8 @@ playlist.initExporter(); if (navigator.mediaDevices) { navigator.mediaDevices.getUserMedia(constraints) - .then(gotStream) - .catch(logError); + .then(gotStream) + .catch(logError); } else if (navigator.getUserMedia && 'MediaRecorder' in window) { navigator.getUserMedia( constraints, From 52e2466787567fd4ba648791f40641f502d93b81 Mon Sep 17 00:00:00 2001 From: fan-droide <119511528+fan-droide@users.noreply.github.com> Date: Mon, 25 Mar 2024 14:11:54 +0000 Subject: [PATCH 2/2] discard blank spaces --- dist/waveform-playlist/js/record.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/waveform-playlist/js/record.js b/dist/waveform-playlist/js/record.js index c1dd94c3..e9076f13 100644 --- a/dist/waveform-playlist/js/record.js +++ b/dist/waveform-playlist/js/record.js @@ -39,8 +39,8 @@ playlist.initExporter(); if (navigator.mediaDevices) { navigator.mediaDevices.getUserMedia(constraints) - .then(gotStream) - .catch(logError); + .then(gotStream) + .catch(logError); } else if (navigator.getUserMedia && 'MediaRecorder' in window) { navigator.getUserMedia( constraints,