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.49k stars 1.75k forks source link

timeSlice sometimes doesn't work properly #776

Closed ShevKG closed 2 years ago

ShevKG commented 2 years ago

I'm struggling working around with timeSlice() method of RecordRTC. It looks like sometimes it freeze for a second and after that

ondataavailable(blob) { 
     console.log(blob);
}

shows in logs that recorded blob is much bigger than others. I tried to reset and release buffered memory, but it didn't worked. Can i even track why this is happening somehow?

ShevKG commented 2 years ago

Logs looks like this:

Blob { size: 65580, type: "audio/wav" }
ggs:269:29
Blob { size: 57388, type: "audio/wav" }
ggs:269:29
Blob { size: 57388, type: "audio/wav" }
ggs:269:29
Blob { size: 57388, type: "audio/wav" }
ggs:269:29
Blob { size: 65580, type: "audio/wav" }
ggs:269:29
Blob { size: 204844, type: "audio/wav" }   <--- this blob is much bigger than other's (timeslice is on 500ms)
ggs:269:29
Blob { size: 57388, type: "audio/wav" }
ShevKG commented 2 years ago

On the next day a problem has gone. I think i should have just refresh the browser and do not testing p2p audio stream simultaneously on a single computer.