During video recording, audio and video signals are captured, encoded, and saved to files. You can specify parameters such as the encoding format, encapsulation format, and file path for video recording.
For details about the APIs used for video recording, see [VideoRecorder in the Media API](../reference/apis/js-apis-media.md).
### Full-Process Scenario
The full video recording process includes creating an instance, setting recording parameters, recording video, pausing, resuming, and stopping recording, and releasing resources.
// pathName indicates the passed recording file name, for example, 01.mp4. The generated file address is /storage/media/100/local/files/Movies/01.mp4.
// To use the media library, declare the following permissions: ohos.permission.MEDIA_LOCATION, ohos.permission.WRITE_MEDIA, and ohos.permission.READ_MEDIA.
// Video recording depends on camera-related interfaces. The following operations can be performed only after the video output start interface is invoked.
// Start video recording.
awaitvideoRecorder.start().then(()=>{
console.info('start success');
},failureCallback).catch(catchCallback);
// Pause video playback before the video output stop interface is invoked.
awaitvideoRecorder.pause().then(()=>{
console.info('pause success');
},failureCallback).catch(catchCallback);
// Resume video playback after the video output start interface is invoked.
awaitvideoRecorder.resume().then(()=>{
console.info('resume success');
},failureCallback).catch(catchCallback);
// Stop video recording after the video output stop interface is invoked.
awaitvideoRecorder.stop().then(()=>{
console.info('stop success');
},failureCallback).catch(catchCallback);
// Reset the recording configuration.
awaitvideoRecorder.reset().then(()=>{
console.info('reset success');
},failureCallback).catch(catchCallback);
// Release the video recording resources and camera object resources.
> The APIs of this module are supported since API version 9. The APIs of API version 9 is of the Canary version and are for trial use only. The API call may be unstable.
Provides the Extension ability for data sharing.
## Modules to Import
```
import DataShareExtensionAbility from '@ohos.application.DataShareExtensionAbility';
| callback | AsyncCallback\<string> | Yes | Callback used to return the normalized URI object if the Data ability supports URI normalization. If the Data ability does not support URI normalization, **null** is returned.|
> The initial APIs of this module are supported since API version 9. The APIs of API version 9 is of the Canary version and are for trial use only. The API call may be unstable.
**StartOptions** is the basic communication component of the system.
## Modules to Import
```
import StartOptions from '@ohos.application.StartOptions';