fbaiodias / react-video-recorder

https://react-video-recorder.vercel.app/
MIT License
189 stars 155 forks source link

Recording fail - ReactVideoRecorderDataAvailableTimeoutError: Method mediaRecorder.ondataavailable wasn't called after 500ms #143

Open itommen opened 2 years ago

itommen commented 2 years ago

Hey In the last few days i started to get an error when starting to record The exception is ReactVideoRecorderDataAvailableTimeoutError: Method mediaRecorder.ondataavailable wasn't called after 500ms

my usage of the component is pretty simple: image

i was digging a little bit on the code and i found that the error is thrown in video-recorder.js lines 540, for some reason.

image

image

my Environment: Mac os M1 chrome version: 96.0.4664.93 (Official Build) (arm64)

also reproduced in: Mac intel based 95.0.4638.54 (Official Build) (x86_64)

The issue is not reproduced in some older chrome versions:

Mac os M1 96.0.4664.55 (Official Build) (arm64)

rfernand commented 2 years ago

Same problem here! @itommen did you found a way to solve this?

I can reproduce the problem with firefox 95.0.1-0.1 using the demo page: https://react-video-recorder.vercel.app/?path=/story/videorecorder--with-default-config

New info: I could reproduce the problem with chrome too. The problem appeared when the camera stream was too slow, the lag cause this timeout exception).

Just solved it with:

<VideoRecorder
  dataAvailableTimeout={2000}
Shivaansh-Agarwal commented 1 year ago

Still facing this issue!! Even tried using @rfernand's solution, but it's not working for me.

simonho1025 commented 1 year ago

Still facing this issue!! Even tried using @rfernand's solution, but it's not working for me.

same problem