Obtains a **MediaLibrary** instance, which is used to access and modify personal media data such as audios, videos, images, and documents.
Obtains a **MediaLibrary** instance, which is used to access and modify personal media data such as audios, videos, images, and documents.
This API can be used only in the FA model.
> **NOTE**
> **NOTE**
>
>
> This API is no longer maintained since API version 8. You are advised to use [mediaLibrary.getMediaLibrary<sup>8+</sup>](#medialibrarygetmedialibrary8) instead.
> This API is no longer maintained since API version 8. You are advised to use [mediaLibrary.getMediaLibrary<sup>8+</sup>](#medialibrarygetmedialibrary8) instead.
...
@@ -256,17 +260,12 @@ Creates a media asset. This API uses a promise to return the result.
...
@@ -256,17 +260,12 @@ Creates a media asset. This API uses a promise to return the result.
**Example**
**Example**
```
```
asyncfunctionexample(){
let DIR_CAMERA = mediaLibrary.DirectoryType.DIR_CAMERA;
console.info("createAsset failed with error:"+err);
});
}
```
```
### getPublicDirectory<sup>8+</sup>
### getPublicDirectory<sup>8+</sup>
...
@@ -578,7 +577,7 @@ Starts image preview. This API can be used to preview local images whose URIs st
...
@@ -578,7 +577,7 @@ Starts image preview. This API can be used to preview local images whose URIs st
> **NOTE**
> **NOTE**
>
>
> This API is deprecated since API version 9. You are advised to use the **\<[Image](../arkui-ts/ts-basic-components-image.md)>** component instead. The **<Image\>** component can be used to render and display local images and network images.
> This API is deprecated since API version 9. You are advised to use the **\<[Image](../arkui-ts/ts-basic-components-image.md)>** component instead. The **\<Image>** component can be used to render and display local and online images.
@@ -620,7 +619,7 @@ Starts image preview, with the first image to preview specified. This API can be
...
@@ -620,7 +619,7 @@ Starts image preview, with the first image to preview specified. This API can be
> **NOTE**
> **NOTE**
>
>
> This API is deprecated since API version 9. You are advised to use the **\<[Image](../arkui-ts/ts-basic-components-image.md)>** component instead. The **<Image\>** component can be used to render and display local images and network images.
> This API is deprecated since API version 9. You are advised to use the **\<[Image](../arkui-ts/ts-basic-components-image.md)>** component instead. The **\<Image>** component can be used to render and display local and online images.