mediaRecorder.ondataavailable broken
jhelmbrecht opened this issue · 6 comments
mediaRecorder.ondataavailable never fires on any browser.
Minimum timeSlice should be 1000 milliseconds or higher. Did you test this demo?
Please share more information (e.g. browser+OS info + how to reproduce this bug e.g. jsfiddle snippet)
I'm seeing the same thing in some cases. The audio recorder demo here is indeed broken because of this.
When recording only audio (video not selected in the constraints) and mediaRecorder.recorderType = MediaRecorderWrapper
thenondataavailable
never seems to be called. Changing the constraints to include video fixes this. Different combinations of setting the mimeType and not setting it and including "audioChannels=1" and not doesn't seem to fix this. With some combination, I was able to get ondataavailable to be called once after I triggered .stop() but the resulting data didn't have any video/audio headers in it and can't be played. I assume the earlier ondataavailable
events are being swallowed for some reason and in this case all I'm seeing is the end of the file.
I can confirm that in this release ondataavailable
seems to work: https://github.com/streamproc/MediaStreamRecorder/releases/tag/1.3.2 (audio demo works in that release)
but sadly in that release the onstop event isn't called. I'm going to try applying the onstop fix to that release though at that point I might just try using MediaRecorder directly.
Thanks Chris, I've been traveling so I haven't been able to experiment and debug much. Friday/sat I hope to have a deeper look.
What i'm noticing is that when I start my stream with captureUserMedia(mediaConstraints, onMediaSuccess, onMediaError); multiple instances of audio are being processed, and I get an echo. When I stop, i believe it is having trouble ending the multiple streams.
@jhelmbrecht that seems like it's unrelated. The echo effect is intentional and can be disabled. If you're not using MultiStreamRecorder
then I don't think you're dealing with multiple streams. The lack of ondataavailable
being called in some cases is still a real issue though!