Matthew Yang
Matthew Yang

Reputation: 625

Record audio on html5 app

I'm trying to build a html5 app, part of it requires the recording of audios whose length should be up to a minute and then encode it into 64 based, so I did quite a bit searching and didn't find a good answer.

Are there any ways to record an audio with Html5, Javascript or maybe local APIs on a html5 app, especially on an IOS device?

Upvotes: 0

Views: 3267

Answers (3)

Remus Negrota
Remus Negrota

Reputation: 674

This may be too late for a response, but having said that, both Chrome and Firefox now fully support getUserMedia and you can use it along with the AudioContext interface if needed, to capture audio directly from the browser.

The following gitHub project records audio and saves it in MP3 format directly in the browser using just HTML5 and JS.

The audio recording is saved in base64 and can also be directly listened to from the browser after the recording is made.

The project can be found here: https://github.com/nusofthq/Recordmp3js

and is an extension of RecorderJS that also uses libmp3lame.js.

If you wish you can read more details about the actual implementation: http://nusofthq.com/blog/recording-mp3-using-only-html5-and-javascript-recordmp3-js/

Upvotes: 1

siniradam
siniradam

Reputation: 2929

Short answer is no for now. Because audio not yet implemented to HTML5 browsers yet. Method is working but you can't capture any audio.

Well here is a detailed answer for you: Recording html5 audio

Upvotes: 1

Bjorn Roche
Bjorn Roche

Reputation: 11469

Html5 doesn't yet have a widely accepted method of recording audio. If you are targeting non-iOS, you can use flash, or any number of javascript wrappers that call out to flash( eg. http://www.sajithmr.me/jrecorder-jquery I think soundmanager2 will also work, but I'm not sure). For iOS, you still need to write an app. :(

Upvotes: 2

Related Questions