tderflinger / vue-audio-tapir

Audio recorder component for Vue.js 3. It enables to record, play and send audio messages to a server.
MIT License
50 stars 15 forks source link

ReferenceError: Lame is not defined #1

Open limbyungki opened 2 years ago

limbyungki commented 2 years ago

vue-router.js?v=e213c068:2226 ReferenceError: Lame is not defined at Object.db3f (vue-audio-tapir.js?v=e213c068:4949:14) at n (vue-audio-tapir.js?v=e213c068:23:24) at Module.fb15 (vue-audio-tapir.js?v=e213c068:6546:17) at n (vue-audio-tapir.js?v=e213c068:23:24) at 00ee (vue-audio-tapir.js?v=e213c068:50:22) at vue-audio-tapir.js?v=e213c068:51:8 at vue-audio-tapir.js?v=e213c068:15:84 at node_modules/vue-audio-tapir/dist/vue-audio-tapir.umd.min.js (vue-audio-tapir.js?v=e213c068:16:7) at __require (chunk-WNHHNXF2.js?v=e213c068:40:50) at vue-audio-tapir.js?v=e213c068:6740:31



"vue": "^3.2.33",
"vue-audio-tapir": "^1.2.0",
"vite": "^2.9.5",

├─ vue-audio-tapir@1.2.0 │ ├─ core-js@3.19.1 │ └─ lamejs@1.2.0

limbyungki commented 2 years ago

And i want prop for WavEncoder.

tderflinger commented 2 years ago

Hi Limbyungki,

thanks for your error report. The problem seems to be with the usage of the vue-audio-tapir with ESModules and Vite. There is a third-party dependency called lamejs that I use and that throws an error in strict mode. Currently, the issue is still under investigation by the team at lamejs. As a temporary alternative, I suggest using vue-audio-tapir with Vue projects created with vue-cli that uses Webpack internally. This worked for me. Once the issue with the lamejs library is resolved I will let you know.

Regards, -Thomas

tderflinger commented 2 years ago

Hi!

I added a new property audioFormat that accepts either MP3 or WAV. You need to use the latest version 1.3.0 of vue-audio-tapir.

Verified with a vue-cli installation with Webpack.