@baas-capacitor/media
v0.0.4
Published
Media Plugin - Save Photo to Galery
Downloads
6
Readme
@baas-capacitor/media
Media Plugin - Save Photo to Galery
Install
npm install @baas-capacitor/media
npx cap sync
API
getPhotoAlbums()
getPhotoAlbums() => Promise<MediaAlbumResponse>
Returns: Promise<MediaAlbumResponse>
createPhotoAlbum(...)
createPhotoAlbum(options: MediaAlbumCreate) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------------- |
| options
| MediaAlbumCreate |
savePhoto(...)
savePhoto(options?: MediaSaveOptions | undefined) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------------- |
| options
| MediaSaveOptions |
Interfaces
MediaAlbumResponse
| Prop | Type |
| ------------ | ------------------------- |
| albums
| MediaAlbum[] |
MediaAlbum
| Prop | Type |
| ---------------- | --------------------------------------------------------- |
| identifier
| string |
| name
| string |
| count
| number |
| type
| MediaAlbumType |
MediaAlbumCreate
| Prop | Type |
| ---------- | ------------------- |
| name
| string |
MediaSaveOptions
| Prop | Type |
| ----------- | ------------------- |
| path
| string |
| album
| string |
Enums
MediaAlbumType
| Members | Value | Description |
| ------------ | --------------------- | -------------------------------------------------------------- |
| Smart
| 'smart' | Album is a "smart" album (such as Favorites or Recently Added) |
| Shared
| 'shared' | Album is a cloud-shared album |
| User
| 'user' | Album is a user-created album |