RecorderManager.resume
Introduction
Resumes recording, which means continuing a previously paused recording.
Usage Restrictions
Supported in the basic library version 4.0.0 or higher.
Parameters
Object object
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| success | function | No | Callback function for a successful API invocation. | |
| fail | function | No | Callback function for a failed API invocation. | |
| complete | function | No | Callback function that is called at the end of the API invocation (whether it was successful or failed). |
object.success Callback Function Parameters
Object res
| Property | Type | Description |
|---|---|---|
| success | string | true - Success |
object.fail Callback Function Parameters
Object res
| Property | Type | Description |
|---|---|---|
| errMsg | string | Error message |
| success | string | false - Failure |
errMsg Description
| Error Message | Description |
|---|---|
| Audio is recording, don't start record again : A10008 | Recording is in progress, please do not start again |
| Audio failed with permission denied : A10011 | No recording permission |
Example
// pages/index/index.js
Page({
resume() {
const recorderManager = dlt.getRecorderManager();
recorderManager.resume({
success: () => {
console.log('Success');
},
});
},
});
In this example, the RecorderManager is used to resume a previously paused recording. The resume method is called, and event listeners can be set up to handle the recording events as needed.