muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.46k stars 1.75k forks source link

stopRecording with await not waiting to finish. #814

Open dantehemerson opened 1 year ago

dantehemerson commented 1 year ago

In the demo using promises, the blob is returning null.

await recorder.stopRecording();
const blob = await recorder.getBlob()
console.log(blob); // null 

But this is working.

recorder.stopRecording(() => {
  const blob = await recorder.getBlob()
  console.log(blob); // writes the blob correctly
});

I would like to use async/await. Thanks for your help.

Duonglam44 commented 1 year ago

same issue, need help I wanna stop and start record continuously without delay