How to Capture Audio with HTML5 and Javascript?

Asked

Viewed 214 times

2

I’m doing research on audio recording with HTML5, but none of the tutorials I found worked, many of them use getUsermedia(), but it seems to me it’s deprecated, then, someone could introduce me a practical example that really works for audio capture with the pc microphone with HTML5 and Javascript.

I found this question from Leandro Costa, but I couldn’t implement the response code.

1 answer

2

In media it is not always easy to make a solution that works in all browsers. In addition, some cases may need to enable specific flags in Chrome for example. The function you mention is the most widespread API.

A source of cool concepts can take this post from Eric Bidelman (original version).

For starters, a very interesting live demo is this one: http://audior.ec/recordmp3js/

The author has a blog with more information about Audio recording via web. The W3C has a specification in progress, but is still in draft.

Finally, depending on your need, Webrtc may be the best alternative: https://webrtc.org/. There are good examples on the project site such as the microphone audio capture.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.