@@ -20,7 +20,9 @@ The following figures show the AVRecorder state transition and the interaction w
## Constraints
Before developing the recording feature, configure the permissions **ohos.permission.MICROPHONE** and **ohos.permission.CAMERA** for your application. For details, see [Permission Application Guide](../security/accesstoken-guidelines.md).
Before developing audio recording, configure the permission **ohos.permission.MICROPHONE** for your application. For details about the configuration, see [Permission Application Guide](../security/accesstoken-guidelines.md).
To use the camera to record videos, the camera module is required. For details about how to use the camera APIs, see [Camera Management](js-apis-camera.md).
## How to Develop
...
...
@@ -28,8 +30,6 @@ For details about the AVRecorder APIs, see the [AVRecorder APIs in the Media Cla
For details about the processes related to the media library, see [Media Library Management](../reference/apis/js-apis-medialibrary.md).
For details about the camera-related process, see [Camera Management](../reference/apis/js-apis-camera.md).
### Full-Process Scenario of Audio and Video Recording
The full audio and video recording process includes creating an instance, setting recording parameters, obtaining the input surface, starting, pausing, resuming, and stopping recording, and releasing resources.
Creates an **AVRecorder** instance. This API uses an asynchronous callback to return the result.
Only one **AVRecorder** instance can be created per device.
To use the camera to record videos, the camera module is required. For details about how to use the camera APIs, see [Camera Management](js-apis-camera.md).
Creates an **AVRecorder** instance. This API uses a promise to return the result.
Only one **AVRecorder** instance can be created per device.
To use the camera to record videos, the camera module is required. For details about how to use the camera APIs, see [Camera Management](js-apis-camera.md).
@@ -1698,6 +1702,8 @@ A recording management class that provides APIs to record media assets. Before c
For details about the AVRecorder demo, see [AVRecorder Development](../../media/avrecorder.md).
To use the camera to record videos, the camera module is required. For details about how to use the camera APIs, see [Camera Management](js-apis-camera.md).
@@ -1716,8 +1722,6 @@ Sets audio and video recording parameters. This API uses an asynchronous callbac
This permission is required only if audio recording is involved.
To use the camera to record videos, the camera module is required. For details about how to obtain the permissions and use the APIs, see [Camera Management](js-apis-camera.md).
@@ -1782,8 +1786,6 @@ Sets audio and video recording parameters. This API uses a promise to return the
This permission is required only if audio recording is involved.
To use the camera to record videos, the camera module is required. For details about how to obtain the permissions and use the APIs, see [Camera Management](js-apis-camera.md).