-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to detect a stream has finished? #14
Comments
Good point. Do you think it would be better to wait until all dataAvailable events are completed before publishing 'stop' or adding another event would be more appropriate? My feeling is to push the stop event until all dataAvailable events are completed. |
Could wait to publish 'stop'. My feeling is since it gets published pretty much immediately, it's not so useful currently. My implementation necessitates changing the blobs emitted by recorderjs into base64 and back into a buffer on the server. The header solution might work well, for me, as long as base64 stuff doesn't interfere with it. |
Check out my branch stop-event with commit 282bcdd and tell me if it does the job. |
That works perfectly from what I can tell. My problem is now off topic, there isn't any way to synchronously convert Blob to base64 so I'll need to finagle with the stop event and what my program does after it is triggered. I hadn't taken that into account. |
If you do recorder.worker.addEventLisener("message", function(typedArray){...}) you will get the raw array buffer instead of a blob. You can then convert easily to base64. |
Merged fix. |
Update docs about using with webpack
I'm currently using opus streaming.
On dataAvailable I'm piping information to the server, but I haven't found a way to detect that all pages are finished and the stream should be closed. After the existing stop event there are still one and sometimes two dataAvailable events that occur.
It would be really helpful if there were a dataFinished event or similar but I wasn't able to pinpoint a good place to put it.
The text was updated successfully, but these errors were encountered: