Code Monkey home page Code Monkey logo

Comments (6)

chris-rudmin avatar chris-rudmin commented on August 22, 2024

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.
Another possibility is If the server is reading the ogg stream, the last page will contain a final page header indicator, and the stream could be terminated from the server side.

from opus-recorder.

Kequc avatar Kequc commented on August 22, 2024

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.

from opus-recorder.

chris-rudmin avatar chris-rudmin commented on August 22, 2024

Check out my branch stop-event with commit 282bcdd and tell me if it does the job.

from opus-recorder.

Kequc avatar Kequc commented on August 22, 2024

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.

from opus-recorder.

chris-rudmin avatar chris-rudmin commented on August 22, 2024

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.
http://stackoverflow.com/questions/9267899/arraybuffer-to-base64-encoded-string

from opus-recorder.

chris-rudmin avatar chris-rudmin commented on August 22, 2024

Merged fix.

from opus-recorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.