I wanted to add the mic-recorder-to-mp3 library to an angular app to record mp3 from the browser.
I added the library through:
npm install mic-recorder-to-mp3
Then I added the import at the top of the app.component.ts.
import * as Mic from 'mic-recorder-to-mp3';
When I start the app: ng serve
I get the following error in the browser console:
index.js:15500 Uncaught ReferenceError: Lame is not defined
at index.js:15500
at index.js:2
at Object../node_modules/mic-recorder-to-mp3/dist/index.js (index.js:5)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.component.ts (main.js:351)
at __webpack_require__ (bootstrap:79)
at Module../src/app/app.module.ts (app.component.ts:11)
at __webpack_require__ (bootstrap:79)
at Module../src/main.ts (environment.ts:16)
at __webpack_require__ (bootstrap:79)
I'm using: Angular CLI: 8.3.29, Node: 12.18.3, package.json screen
Could you help me how to add this do an angular project?