Recording audio with the MediaStream Recorder API
This demo shows you how to record audio directly in the browser using native browser APIs. The MediaStream Recorder API makes media recording in the browser very easy. The recorded audio is captured in chunks and saved as a single audio file, which you can download or upload to a server. Most browsers support recording in formats like WebM (Opus), Ogg (Opus), or MP4 (AAC).
The MediaStream Recorder API is now supported by all major browsers, including Safari 14.1+.
Recordings:
Resources
- Code for this demo on GitHub: https://github.com/addpipe/media-recorder-api-audio-demo
- Our blog post on the topic: https://blog.addpipe.com/recording-audio-in-the-browser-using-pure-html5-and-minimal-javascript/
- We've also built a video recording demo