旧API wx.startRecord、wx.stopRecord、、停止维护,请使用
wx.getRecorderManager
代替
wx.startRecord(Object object)
开始录音。当主动调用 wx.stopRecord,或者录音超过1分钟时自动结束录音。当用户离开小程序时,此接口无法调用。本接口停止维护,请使用 wx.getRecorderManager 代替
调用前需要 用户授权 scope.record
参数Object object
object.success 回调函数参数Object res
wx.stopRecord()
停止录音。本接口停止维护,请使用 wx.getRecorderManager 代替
示例代码
wx.startRecord({ //开始录音
success(res) {
const tempFilePath = res.tempFilePath
}
})
setTimeout(function () {
wx.stopRecord() //