Javascript library to record user audio?

This is not one of them: "How to record audio in a browser?" questions ... I know that the HTML5 Stream API is around the corner, and Flash already has access to a custom microphone and camera. I'm just wondering, as a Javascript developer with little knowledge of Flash, if someone has developed a JS library that captures the capabilities of a Flash device for writing, but sends the results back to javascript (presumably using ExternalInterface).

In other words ... libraries like SoundManager2 use a flash reserve to play sound, but they don't seem to allow recording. Has anyone written a JS library that uses an invisible flash movie to record sound?

+4
source share
2 answers

This does most of what you are looking for:

https://code.google.com/p/wami-recorder/

It records sound and sends it to the server via HTTP POST (avoiding the need for Flash Media Server.) The JavaScript API is accessible through ExternalInterface.

I'm not sure why you need audio bytes in JavaScript, but it would probably be easy to change it and do it.

+5
source

Unfortunately, you cannot record audio in Flash only in the browser. All Flash audio interfaces are designed (unexpectedly surprised) to talk to the Flash media server (or Red5): there is no interface for storing recorded audio data locally and transferring recorded audio data to Javascript.

After setting up Red5 / FMS, you can control the recording process from Javascript: you can start / stop / play the audio stream to / from the server. However, for security reasons, you should have a flash movie that is at least 216 x 138 (see http://blog.natebeck.net/2009/01/tip-of-the-day-tricks-of-the-mic- settings-panel / for recording), otherwise the settings manager will not be displayed: this prevents hiding the flash widget on the page and eavesdropping.

So no, the invisible flash is controlled from javascript.

0
source

All Articles