May 18, 2021 WeChat Mini Program Development Document
Starting with the base library 1.6.0, this interface stops maintenance, using wx.getRecorderManager instead
Stop recording.
Property | Type | The default | Required | Description |
---|---|---|---|---|
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
wx.startRecord({
success (res) {
const tempFilePath = res.tempFilePath
}
})
setTimeout(function () {
wx.stopRecord() // 结束录音
}, 10000)