Closed edubarbieri closed 6 years ago
I debug the code, the error happens because i create multiple instances of Recorder, but no event listener are called. Any idea ?
Recorder should only be initialized once and then reused. Try something like this:
(function(Recorder) {
audioRecorder = new Recorder({
monitorGain : 0,
numberOfChannels : 1,
wavBitDepth : 16,
encoderPath : '/static/js/lib/waveWorker.min.js',
leaveStreamOpen: true
});
function startRecording() {
audioRecorder.start()
}
$('#btnVoiceSearch').click(function(){
if(!recording){
startRecording();
}else{
stopRecord();
}
});
})(Recorder);
@maxmatthews Thanks for your answer.
I change my code and create only one instance of Recorder and the error did not happen anymore on android. About the event listener, i changed element in html and solve the problem.
The problem was my implantation not Record Js lib.
Hi, I am trying perform voice recording on Android 7.0 in Chrome 62.0 and i am getting the following error:
Uncaught DOMException: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6). at new n (http://../static/js/lib/recorder.min.js:1:982)
My recording code looks like this:
Can you help me?