// 录音管理
let record = function (recorderManager) {
this.recorderManager = recorderManager
this.recordStart()
}
record.prototype = {
// 开始录音
start: function (startObj) {
this.recorderManager.start(startObj)
},
//录音开始事件
recordStart: function () {
this.recorderManager.onStart(() => {
console.log(this.recorderManager, 'this.recorderManager')
})
}
}
that.newRecord.start(startObj)
//录音管理,new 出 第二阶段的实例
recorderManager = wx.getRecorderManager()
that.newRecord = new record(recorderManager)
that.newRecord.recorderManager.onStop((res) => {
console.log(res, '获取录制完的链接')
})