You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Long recordings eat up a lot of memory, how to release it? Just using Chrome / Mac the below simple code, and have tried several methods implied by their names to clear any stored data.
Shutting off the recording stops the accumulation but that won't work in my application. Any ideas?
<html>
<head>
<script src="https://www.WebRTC-Experiment.com/RecordRTC.js"></script>
<script>
let mediaRecorder;
function startRecording() {
navigator.mediaDevices.getUserMedia({audio: true}).then((stream) => {
// audioStream = stream
mediaRecorder = new RecordRTC(stream, {
type: "audio",
mimeType: "audio/wav;codecs=pcm", // endpoint requires 16bit PCM audio
recorderType: StereoAudioRecorder,
timeSlice: 250, // set 250 ms intervals of data that sends to AAI
});
mediaRecorder.startRecording();
});
}
</script>
</head>
<body onload="startRecording()">
<h1>leaky memories</h1>
</body>
</html>
Trying these either break the recording or have no apaprent effect:
clearRecordedData()
clearRecordedDataCB()
resetVariables() <-- doesn't work
reset() <-- stops recording
The text was updated successfully, but these errors were encountered:
I was struggling to deal with this memory consumption. I ended up removing RecordRTC.js lines 3136, 3141 and 3144. This class absolutely save me, but this "memory leak" almost ruins everything.
Maybe some config in constructor do control wheter to keep this buffer or not, or the maximum number of bytes to save, can be very helpful.
Long recordings eat up a lot of memory, how to release it? Just using Chrome / Mac the below simple code, and have tried several methods implied by their names to clear any stored data.
Shutting off the recording stops the accumulation but that won't work in my application. Any ideas?
Trying these either break the recording or have no apaprent effect:
clearRecordedData()
clearRecordedDataCB()
resetVariables()
<-- doesn't workreset()
<-- stops recordingThe text was updated successfully, but these errors were encountered: