Kagami / vmsg

:musical_note: Library for creating voice messages
https://kagami.github.io/vmsg/
Creative Commons Zero v1.0 Universal
348 stars 58 forks source link

Issues on Safari and Chrome #24

Open yourbuddyraj opened 5 years ago

yourbuddyraj commented 5 years ago

Hi Kagami,

First, thanks for the great package. It's been wonderful to use, especially compared to a lot of the alternatives out there. I am using vmsg in a React app to record audio and post it to a server. I want users to be able to record many short samples within a single page session (just saying one or two words, so the audio file would only be a few seconds long). My implementation of the recording is very similar to your React demo. I wanted to ask for your help regarding issues I was having with Chrome, and make you aware about an issue that I found in Safari.

Regarding Safari, my application was freezing after 4 recordings. I found that this was because vmsg kept opening new AudioContexts, and I believe Safari limits the number of AudioContexts you can have open in a page. I was able to solve that by adding "this.audioCtx.close()" to the stopRecording() method in your code.

For Chrome, I get the following error after around 30 recordings in a page session: "Error: RangeError: WebAssembly Instantiation: Out of memory: wasm memory at Worker.worker.onmessage" I'm not very familiar with WebAssembly, and I wasn't able to find much regarding this by searching online. Would appreciate your help a lot. Thanks!

Kagami commented 5 years ago

Hi. I haven't heavily tested multiple recording sessions on the same page, there might be some bugs. I will look into it, thanks.

Morsmetus commented 4 years ago

@Kagami Is this issue resolved?

alectrocute commented 4 years ago

@Morsmetus https://github.com/Kagami/vmsg/issues/25#issuecomment-507069880