Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mic-recorder-to-mp3

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mic-recorder-to-mp3 - npm Package Compare versions

Comparing version 1.2.3 to 2.0.0

2

package.json
{
"name": "mic-recorder-to-mp3",
"version": "1.2.3",
"version": "2.0.0",
"description": "Record your microphone audio input and get an audio/mp3 ouput buffer/blob.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -21,3 +21,3 @@ # Microphone Recorder to Mp3

You can add via CDN using the address: [https://unpkg.com/mic-recorder-to-mp3@1.2.2](https://unpkg.com/mic-recorder-to-mp3@1.2.2). You can find the minified version in the same address, ex: [https://unpkg.com/mic-recorder-to-mp3@1.2.2/dist/index.min.js](https://unpkg.com/mic-recorder-to-mp3@1.2.2/dist/index.min.js)
You can add via CDN using the address: [https://unpkg.com/mic-recorder-to-mp3@1.2.3](https://unpkg.com/mic-recorder-to-mp3@1.2.3). You can find the minified version in the same address, ex: [https://unpkg.com/mic-recorder-to-mp3@1.2.3/dist/index.min.js](https://unpkg.com/mic-recorder-to-mp3@1.2.3/dist/index.min.js)

@@ -51,24 +51,23 @@ **About the version in URL**: Change the URL version to any of our releases.

// Start recording. Browser will request permission to use your microphone.
recorder.start(function () {
console.log('Start recording');
}, function () {
alert('We could not make use of your microphone at the moment');
recorder.start().then(() => {
// something else
}).catch((e) => {
console.error(e);
});
// Once you are done singing your best song, stop and get the mp3.
recorder
.stop()
.getMp3((buffer, blob) => {
// do what ever you want with buffer and blob
// Example: Create a mp3 file and play
const file = new File(buffer, 'me-at-thevoice.mp3', {
type: blob.type,
lastModified: Date.now()
});
.getMp3().then(([buffer, blob]) => {
// do what ever you want with buffer and blob
// Example: Create a mp3 file and play
const file = new File(buffer, 'me-at-thevoice.mp3', {
type: blob.type,
lastModified: Date.now()
});
const player = new Audio(URL.createObjectURL(file));
player.play();
const player = new Audio(URL.createObjectURL(file));
player.play();
}, function (e) {
}).catch((e) => {
alert('We could not retrieve your message');

@@ -75,0 +74,0 @@ console.log(e);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc