mic-recorder-to-mp3
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "mic-recorder-to-mp3", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Record your microphone audio input and get an audio/mp3 ouput buffer/blob.", | ||
@@ -8,3 +8,4 @@ "main": "dist/index.js", | ||
"build": "rollup -c", | ||
"minify": "minify=true rollup -c" | ||
"minify": "minify=true rollup -c", | ||
"watch": "rollup -c -w" | ||
}, | ||
@@ -25,3 +26,4 @@ "repository": "git@github.com:closeio/mic-recorder-to-mp3.git", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-uglify": "^2.0.1" | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"rollup-watch": "^4.0.0" | ||
}, | ||
@@ -42,4 +44,5 @@ "babel": { | ||
"dependencies": { | ||
"lamejs": "^1.2.0" | ||
"lamejs": "^1.2.0", | ||
"webrtc-adapter": "^4.0.2" | ||
} | ||
} |
# Microphone Recorder to Mp3 | ||
Record your microphone audio input and get a ```audio/mp3``` file in the end. | ||
Record your microphone audio input and get an ```audio/mp3``` file in the end. | ||
@@ -13,3 +13,3 @@ # Install | ||
## NPM | ||
## npm | ||
@@ -22,6 +22,20 @@ ```bash | ||
You can add via CDN using the address: [https://unpkg.com/mic-recorder-to-mp3@1.2.1](https://unpkg.com/mic-recorder-to-mp3@1.2.1). You can find the minified version in the same address, ex: [https://unpkg.com/mic-recorder-to-mp3@1.2.1/dist/index.min.js](https://unpkg.com/mic-recorder-to-mp3@1.2.1/dist/index.min.js) | ||
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) | ||
**About the version in URL**: Change the URL version to any of our releases. | ||
# Development | ||
- Watch for changes: | ||
```bash | ||
npm run watch | ||
``` | ||
- Regular build: | ||
```bash | ||
npm run build | ||
``` | ||
# How to use | ||
@@ -47,18 +61,18 @@ | ||
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() | ||
}); | ||
.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() | ||
}); | ||
const player = new Audio(URL.createObjectURL(file)); | ||
player.play(); | ||
const player = new Audio(URL.createObjectURL(file)); | ||
player.play(); | ||
}, function (e) { | ||
alert('We could not retrieve your message'); | ||
console.log(e); | ||
}); | ||
}, function (e) { | ||
alert('We could not retrieve your message'); | ||
console.log(e); | ||
}); | ||
``` | ||
@@ -71,2 +85,3 @@ | ||
## Lamejs Notice | ||
This library uses lamejs as a direct dependency. We build our releases with [lamejs](https://github.com/zhuker/lamejs/) built-in, so you don't need to add another dependency. | ||
@@ -73,0 +88,0 @@ |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3270427
10
18349
90
2
9
1
3
+ Addedwebrtc-adapter@^4.0.2
+ Addedsdp@2.12.0(transitive)
+ Addedwebrtc-adapter@4.2.2(transitive)