capacitor-media-metadata
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -26,2 +26,21 @@ { | ||
"slug": "metadata" | ||
}, | ||
{ | ||
"name": "cover", | ||
"signature": "(options: MetadataOptionsPath) => Promise<MetadataCover>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "MetadataOptionsPath" | ||
} | ||
], | ||
"returns": "Promise<MetadataCover>", | ||
"tags": [], | ||
"docs": "get cover for audio files", | ||
"complexTypes": [ | ||
"MetadataCover", | ||
"MetadataOptionsPath" | ||
], | ||
"slug": "cover" | ||
} | ||
@@ -147,3 +166,3 @@ ], | ||
"tags": [], | ||
"docs": "base64 image (if withCover is `true`)", | ||
"docs": "base64 image (if `withCover` is `true`)", | ||
"complexTypes": [], | ||
@@ -176,2 +195,34 @@ "type": "string | undefined" | ||
] | ||
}, | ||
{ | ||
"name": "MetadataCover", | ||
"slug": "metadatacover", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "cover", | ||
"tags": [], | ||
"docs": "base64 image", | ||
"complexTypes": [], | ||
"type": "string | undefined" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "MetadataOptionsPath", | ||
"slug": "metadataoptionspath", | ||
"docs": "", | ||
"tags": [], | ||
"methods": [], | ||
"properties": [ | ||
{ | ||
"name": "path", | ||
"tags": [], | ||
"docs": "file path", | ||
"complexTypes": [], | ||
"type": "string" | ||
} | ||
] | ||
} | ||
@@ -178,0 +229,0 @@ ], |
@@ -6,2 +6,6 @@ export interface CapacitorMediaMetadataPlugin { | ||
metadata(options: MetadataOptions): Promise<Metadata>; | ||
/** | ||
* get cover for audio files | ||
*/ | ||
cover(options: MetadataOptionsPath): Promise<MetadataCover>; | ||
} | ||
@@ -14,2 +18,6 @@ export interface MetadataOptions { | ||
} | ||
export interface MetadataOptionsPath { | ||
/** file path */ | ||
path: string; | ||
} | ||
export interface Metadata { | ||
@@ -46,4 +54,8 @@ /** CD track number */ | ||
writer: string; | ||
/** base64 image (if withCover is `true`) */ | ||
/** base64 image (if `withCover` is `true`) */ | ||
cover?: string; | ||
} | ||
export interface MetadataCover { | ||
/** base64 image */ | ||
cover?: string; | ||
} |
import { WebPlugin } from '@capacitor/core'; | ||
import type { CapacitorMediaMetadataPlugin, Metadata, MetadataOptions } from './definitions'; | ||
import type { CapacitorMediaMetadataPlugin, Metadata, MetadataCover, MetadataOptions, MetadataOptionsPath } from './definitions'; | ||
export declare class CapacitorMediaMetadataWeb extends WebPlugin implements CapacitorMediaMetadataPlugin { | ||
metadata(options: MetadataOptions): Promise<Metadata>; | ||
cover(options: MetadataOptionsPath): Promise<MetadataCover>; | ||
} |
@@ -7,3 +7,7 @@ import { WebPlugin } from '@capacitor/core'; | ||
} | ||
async cover(options) { | ||
console.log('ECHO', options); | ||
return new Promise(() => ({})); | ||
} | ||
} | ||
//# sourceMappingURL=web.js.map |
@@ -16,2 +16,6 @@ 'use strict'; | ||
} | ||
async cover(options) { | ||
console.log('ECHO', options); | ||
return new Promise(() => ({})); | ||
} | ||
} | ||
@@ -18,0 +22,0 @@ |
@@ -13,2 +13,6 @@ var capacitorCapacitorMediaMetadata = (function (exports, core) { | ||
} | ||
async cover(options) { | ||
console.log('ECHO', options); | ||
return new Promise(() => ({})); | ||
} | ||
} | ||
@@ -15,0 +19,0 @@ |
{ | ||
"name": "capacitor-media-metadata", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Media metadata reader for Android", | ||
@@ -20,3 +20,3 @@ "main": "dist/plugin.cjs.js", | ||
"type": "git", | ||
"url": "git+https://git.ikilote.net/zaide/capacitor-media-metadata.git" | ||
"url": "https://git.ikilote.net/zaide/capacitor-media-metadata.git" | ||
}, | ||
@@ -26,4 +26,6 @@ "bugs": { | ||
}, | ||
"homepage": "https://git.ikilote.net/zaide/capacitor-media-metadata.git#readme", | ||
"keywords": [ | ||
"android", | ||
"audio", | ||
"metadata", | ||
@@ -30,0 +32,0 @@ "capacitor", |
@@ -17,2 +17,3 @@ # capacitor-media-metadata | ||
* [`metadata(...)`](#metadata) | ||
* [`cover(...)`](#cover) | ||
* [Interfaces](#interfaces) | ||
@@ -42,2 +43,19 @@ | ||
### cover(...) | ||
```typescript | ||
cover(options: MetadataOptionsPath) => Promise<MetadataCover> | ||
``` | ||
get cover for audio files | ||
| Param | Type | | ||
| ------------- | ------------------------------------------------------------------- | | ||
| **`options`** | <code><a href="#metadataoptionspath">MetadataOptionsPath</a></code> | | ||
**Returns:** <code>Promise<<a href="#metadatacover">MetadataCover</a>></code> | ||
-------------------- | ||
### Interfaces | ||
@@ -48,20 +66,20 @@ | ||
| Prop | Type | Description | | ||
| ------------------- | ------------------- | ------------------------------------- | | ||
| **`cdTrackNumber`** | <code>string</code> | CD track number | | ||
| **`artist`** | <code>string</code> | artist | | ||
| **`albumArtist`** | <code>string</code> | album artist | | ||
| **`albumName`** | <code>string</code> | album name | | ||
| **`bitrate`** | <code>string</code> | bitrate | | ||
| **`date`** | <code>string</code> | date | | ||
| **`genre`** | <code>string</code> | genre | | ||
| **`discNumber`** | <code>string</code> | disc number | | ||
| **`title`** | <code>string</code> | title | | ||
| **`year`** | <code>string</code> | year | | ||
| **`mimetype`** | <code>string</code> | mimetype | | ||
| **`composer`** | <code>string</code> | composer | | ||
| **`duration`** | <code>string</code> | duration | | ||
| **`numTacks`** | <code>string</code> | number of tacks | | ||
| **`writer`** | <code>string</code> | writer | | ||
| **`cover`** | <code>string</code> | base64 image (if withCover is `true`) | | ||
| Prop | Type | Description | | ||
| ------------------- | ------------------- | --------------------------------------- | | ||
| **`cdTrackNumber`** | <code>string</code> | CD track number | | ||
| **`artist`** | <code>string</code> | artist | | ||
| **`albumArtist`** | <code>string</code> | album artist | | ||
| **`albumName`** | <code>string</code> | album name | | ||
| **`bitrate`** | <code>string</code> | bitrate | | ||
| **`date`** | <code>string</code> | date | | ||
| **`genre`** | <code>string</code> | genre | | ||
| **`discNumber`** | <code>string</code> | disc number | | ||
| **`title`** | <code>string</code> | title | | ||
| **`year`** | <code>string</code> | year | | ||
| **`mimetype`** | <code>string</code> | mimetype | | ||
| **`composer`** | <code>string</code> | composer | | ||
| **`duration`** | <code>string</code> | duration | | ||
| **`numTacks`** | <code>string</code> | number of tacks | | ||
| **`writer`** | <code>string</code> | writer | | ||
| **`cover`** | <code>string</code> | base64 image (if `withCover` is `true`) | | ||
@@ -76,2 +94,16 @@ | ||
#### MetadataCover | ||
| Prop | Type | Description | | ||
| ----------- | ------------------- | ------------ | | ||
| **`cover`** | <code>string</code> | base64 image | | ||
#### MetadataOptionsPath | ||
| Prop | Type | Description | | ||
| ---------- | ------------------- | ----------- | | ||
| **`path`** | <code>string</code> | file path | | ||
</docgen-api> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
34255
361
1
106
30