Problem with converting audio with Opus-Recorder within Angular

62 Views Asked by At

I need to convert opus audio on-the-go to something else because the delightful developer experiencie that Safari and iOS always make sure that happen.

The opus-recorder library is the best one that I’ve found, but there is a problem with angular. Let me explain: for the one that does not know, this library uses Web Workers to handle the encoding jobs, so far, so well.

The problem comes here: the library’s web worker uses an webassembly that roots in library’s directory, and in the runtime the library’s webworker tries to access the file via get request, from the served runtime. That’s the problem: when their webworker tries to access the file, the server returns a HTML file for that route (because angular handles it).

Do you know some way that how could i solve this?

I tried everything i know. I tried to import the wasm module from the webpack config, tried to import it from the typescript <import “!!file-loader…”>, tried the regular import like the library’s documentation suggested

0

There are 0 best solutions below