cordova-plugin-media-retrieve
Version:
Cordova ContentProvider Plugin, get meida file list from storage
39 lines (28 loc) • 808 B
Markdown
> A cordova plugin which can list all the media files
Install with [npm](https://www.npmjs.com/package/cordova-plugin-media-retrieve)
`cordova plugin add cordova-plugin-media-retrieve`
* Get image list from storage<br>
`MediaRetrieve.getImageList(onSuccessCallback,onErrorCallBack)`
* Get audio list from storage<br>
`MediaRetrieve.getAudioList(onSuccessCallBack,onErrorCallBack)`
* Get video list from storage<br>
`MediaRetrieve.getVideoList(onSuccessCallBack,onErrorCallBack)`
return a **json object** which contains the data you want to get
```
{
"data":[
{
"name":"display name",
"uri":"content uri",
"path":"absolute path"
},
{
...
}
]
}
```