capacitor-media-metadata
v0.0.3
Published
Media metadata reader for Android
Downloads
2
Maintainers
Readme
capacitor-media-metadata
Media metadata reader for Android
Install
npm install capacitor-media-metadata
npx cap sync
API
metadata(...)
metadata(options: MetadataOptions) => Promise<Metadata>
get metadata for audio files
| Param | Type |
| ------------- | ----------------------------------------------------------- |
| options
| MetadataOptions |
Returns: Promise<Metadata>
cover(...)
cover(options: MetadataOptionsPath) => Promise<MetadataCover>
get cover for audio files
| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| options
| MetadataOptionsPath |
Returns: Promise<MetadataCover>
Interfaces
Metadata
| Prop | Type | Description |
| ------------------- | ------------------- | --------------------------------------- |
| cdTrackNumber
| string | CD track number |
| artist
| string | artist |
| albumArtist
| string | album artist |
| albumName
| string | album name |
| bitrate
| string | bitrate |
| date
| string | date |
| genre
| string | genre |
| discNumber
| string | disc number |
| title
| string | title |
| year
| string | year |
| mimetype
| string | mimetype |
| composer
| string | composer |
| duration
| string | duration |
| numTacks
| string | number of tacks |
| writer
| string | writer |
| cover
| string | base64 image (if withCover
is true
) |
MetadataOptions
| Prop | Type | Description |
| --------------- | -------------------- | ------------------------------------------ |
| path
| string | file path |
| withCover
| boolean | add cover in metadata (false
by default) |
MetadataCover
| Prop | Type | Description |
| ----------- | ------------------- | ------------ |
| cover
| string | base64 image |
MetadataOptionsPath
| Prop | Type | Description |
| ---------- | ------------------- | ----------- |
| path
| string | file path |