安装:
npm i js-audio-recorder
调用:
import Recorder from 'js-audio-recorder'; let recorder = new Recorder();
基本功能看官网:https://recorder-api.zhuyuntao.cn/
播放时的波形图,一开始没搞出来,后面看了人家的例子,才弄好,这里记录一下:
首先,要用到两个canvas标签
<canvas id="recordCanvas" ref="record"></canvas> <canvas id="playCanvas" ref="play"></canvas>data() { return { recorder: null, // 录音 drawRecordId: null, drawPlayId: null, } }, mounted(){ this.recorder = new Recorder() },
标签:null,js,波形图,recorder,audio,Recorder From: https://www.cnblogs.com/ZJTL/p/17461224.html