Search code examples
javascripthtmlvoice-recording

voice recorder with recorder js


I want make a field to record voice (username,password and a pist of voice) i tried to use recorder js in this repo : https://github.com/cwilso/AudioRecorder

but the problem is when i download this project and try to open it localy it show this error in the console

Uncaught DOMException: Failed to construct 'Worker': Script at 'file:///C:/Users/XX/Desktop/AudioRecorder-master/js/recorderjs/recorderWorker.js' cannot be accessed from origin 'null'.
at new Recorder (file:///C:/Users/XX/Desktop/AudioRecorder-master/js/recorderjs/recorder.js:34:18)
at gotStream (file:///C:/Users/XX/Desktop/AudioRecorder-master/js/main.js:152:21)

is there other solution then recorder js to do this ?


Solution

  • This library looks a bit outdated, I would suggest using https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia API to perform what you are trying to accomplish.