Skip to content
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

Record & Encode in All Formats #25

Open
ZachMoreno opened this issue Nov 15, 2017 · 1 comment
Open

Record & Encode in All Formats #25

ZachMoreno opened this issue Nov 15, 2017 · 1 comment

Comments

@ZachMoreno
Copy link

ZachMoreno commented Nov 15, 2017

Thank you so much for this awesome library. I've wrapped it in a web component that I'll open source in the near future.

I'm wondering how I'd go about recording, explicitly encoding it into all 3 formats, and returning the 3 blobs to the onComplete event handler? From what I can tell, there's not currently a way to record a single buffer & then explicitly encode that buffer into the 3 supported formats, correct?

Or would I need to record 3 buffers at the same time, encode each buffer into 1 of the formats, and then each would fire it's own onComplete event?

@ZachMoreno
Copy link
Author

Something like...

let formats = ['wav', 'ogg', 'mp3'];

formats.forEach(format => {
    recorder.setEncoding(format);
    recorder.encode(buffer);
});

I think this could be done by exposing the encoder.encode() method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant