RecorderManager.stop
收藏我的收藏
基础库 1.0.0 开始支持本方法,这是一个同步方法。
停止录音。
| 前提条件 | 无 |
| 业务背景 | 无 |
| 使用限制 | 无 |
| 注意事项 | 无 |
| 相关教程 | 无 |
语法
RecorderManager.stop()
参数说明
无
返回值
无
错误码
| errNo | errMsg | 说明 | 最低支持版本 |
|---|---|---|---|
| 20000 | Operation type is null | 1.0.0 | |
| 21000 | Operation type is error | 1.0.0 | |
| 20000 | internal error | 小游戏框架内部错误,有需要请创建工单咨询 | 1.0.0 |
代码示例
const recorderManager = tt.getRecorderManager(); recorderManager.start(); console.log("录音开始"); setTimeout(() => { recorderManager.stop(); console.log("录音结束"); }, 2000);
