提交 416af425 编写于 作者: W wusongqing

updated docs against 5324

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 188c64ed
# Media Library Management
> **NOTE**<br>
> **NOTE**
>
> This component is supported since API version 6. Updates will be marked with a superscript to indicate their earliest API version.
## Modules to Import
......@@ -93,7 +94,7 @@ let imagesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [imageType.toString()],
};
mediaLibrary.getFileAssets(imagesfetchOp, (error, fetchFileResult) => {
media.getFileAssets(imagesfetchOp, (error, fetchFileResult) => {
if (fetchFileResult != undefined) {
console.info('mediaLibraryTest : ASSET_CALLBACK fetchFileResult success');
fetchFileResult.getAllObject((err, fileAssetList) => {
......@@ -135,7 +136,7 @@ let imagesfetchOp = {
selections: fileKeyObj.MEDIA_TYPE + '= ?',
selectionArgs: [imageType.toString()],
};
mediaLibrary.getFileAssets(imagesfetchOp).then(function(fetchFileResult){
media.getFileAssets(imagesfetchOp).then(function(fetchFileResult){
console.info("getFileAssets successfully:"+ JSON.stringify(dir));
}).catch(function(err){
console.info("getFileAssets failed with error:"+ err);
......@@ -182,7 +183,7 @@ Unsubscribes from the media library changes. This API uses an asynchronous callb
**Example**
```
mediaLibrary.off('imageChange', () => {
media.off('imageChange', () => {
// stop listening success
})
```
......@@ -350,7 +351,7 @@ let AlbumNoArgsfetchOp = {
selections: '',
selectionArgs: [],
};
mediaLibrary.getAlbums(AlbumNoArgsfetchOp, (err, albumList) => {
media.getAlbums(AlbumNoArgsfetchOp, (err, albumList) => {
if (albumList != undefined) {
const album = albumList[0];
console.info('album.albumName = ' + album.albumName);
......@@ -390,7 +391,7 @@ let AlbumNoArgsfetchOp = {
selections: '',
selectionArgs: [],
};
mediaLibrary.getAlbums(AlbumNoArgsfetchOp).then(function(albumList){
media.getAlbums(AlbumNoArgsfetchOp).then(function(albumList){
console.info("getAlbums successfully:"+ JSON.stringify(albumList));
}).catch(function(err){
console.info("getAlbums failed with error:"+ err);
......@@ -439,7 +440,6 @@ Call this API when you no longer need to use the APIs in the **MediaLibrary** in
**Example**
```
var media = mediaLibrary.getMediaLibrary(context);
media.release()
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册