I need to use audioEncoder library in a Vue3 app.
https://www.npmjs.com/package/audio-encoder
I installed audioEncoder using "npm install audio-encoder"
I see the library under the "node_modules"
I am able to import this as:
import { audioEncoder } from "audio-encoder";
The following line gives an error:
const ae = new audioEncoder();
ae.encode(audioBuffer, 128, null, function onComplete(blob) {
console.log(blob);
});
The error message is: audioEncoder is not a constructor
I also tried:
audioEncoder.encode(audioBuffer, 128, null, function onComplete(blob) {
console.log(blob);
});
this gives the following error: TypeError: Cannot read properties of undefined (reading 'encode')
Any recommendations on what's the best way to use this library.
Thanks!