# AMR 录音机 [![GitHub stars](https://img.shields.io/github/stars/BenzLeung/benz-amr-recorder.svg?style=social&label=Star&maxAge=2592000)](https://gitHub.com/BenzLeung/benz-amr-recorder/) ([README in English](./README-EN.md)) [![npm](https://img.shields.io/npm/v/benz-amr-recorder.svg)](https://www.npmjs.com/package/benz-amr-recorder) [![npm](https://img.shields.io/npm/dt/benz-amr-recorder.svg)](https://www.npmjs.com/package/benz-amr-recorder) [![size](https://img.shields.io/github/size/BenzLeung/benz-amr-recorder/BenzAMRRecorder.min.js)](https://gitHub.com/BenzLeung/benz-amr-recorder/BenzAMRRecorder.min.js) [![gzip size](http://img.badgesize.io/https://npmcdn.com/benz-amr-recorder/BenzAMRRecorder.min.js?compression=gzip)](https://gitHub.com/BenzLeung/benz-amr-recorder/BenzAMRRecorder.min.js) 纯前端解码、播放、录音、编码 AMR 音频,无须服务器支持,基于 [amr.js](https://github.com/jpemartins/amr.js) 和 [RecorderJs](https://github.com/jergason/Recorderjs)。 注意:由于使用了 amr.js 做编码和解码,因此 js 文件(压缩后,未 gzip)接近 500 KB,使用前请考虑。 **2019-10-05 更新 (v1.1.0):** 增加浏览器支持检测功能,增加暂停播放、设置播放进度功能。 **2022-09-26 更新 (v1.1.4):** 1. 使用 `create-react-app` 脚手架测试了在 React 的使用情况,结论:没有发现问题。[代码点我](https://github.com/BenzLeung/test-amr-react) 2. 增加一个~~好像没有什么用的~~ `destroy()`,功能:释放amr数据和pcm数据、解绑所有事件、令对象作废。 3. 新功能:解绑事件,用法:给事件传入 `null`,例如:`amr.onPlay(null)` 。 **2022-09-27 更新 (v1.1.5):** 更新 rollup 库以消除 github 的安全提醒。 ## 特性 - 方便的 API 实现解码、播放、录音、编码 AMR 文件。 - 支持 url 和 blob (即``)方式获取 AMR。 - 支持将浏览器 `