elsmr / mp3-mediarecorder

🎙MediaRecorder ponyfill that records audio as mp3

Home Page:https://mp3-mediarecorder.elsmr.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Race condition inside worker

kjaunslavietis opened this issue · comments

If an instance of the worker is created, attached to a MediaRecorder instance, and MediaRecorder.start() is called (following your example), there is a race condition where the worker will receive a START_RECORDING message and attempt to access the vmsg.wasm in onStartRecording which hasn't been loaded yet by getWasmModule . This will cause it to fail silently and the recorder will stay in 'inactive' state.

Hey thanks for the report! I'll have a look at this soon

Hi this issue should be fixed in mp3-mediarecorder@4.0.3. Can you verify? 😄

Looks good, thanks!

commented

I think I am getting this issue on Nextjs not sure if I am loading the worker correctly, how do I debug this?