https://www.npmjs.com/package/benz-amr-recorder

1.

使用 npm

npm install benz-amr-recorder
var BenzAMRRecorder = require('benz-amr-recorder');

  let BenzAMRRecorder = require('benz-amr-recorder');  //引入
  this.amr = null;
  this.amr = new BenzAMRRecorder();    //创建
  this.amr.initWithUrl(data.audios[0].url);   //初始化
  this.amrTime.duration = data.audios[0].duration / 1000;  //音频总时长
  this.amr.play()  //播放
  this.amr.stop() //停止

 

 

Logo

前往低代码交流专区

更多推荐