0.0.20 • Published 6 years ago
rn-meta-media v0.0.20
A React Native library to use fetch metadata, based on react-native-media-meta
Get media file metadata in your React Native app
Installation
$ npm install rn-meta-media --save
$ react-native linkUsage
import MediaMeta from 'rn-meta-media';
const path = '<your file path here>';
MediaMeta.get(path)
.then(metadata => console.log(metadata))
.catch(err => console.error(err));API
MediaMeta.get(path) - Promise
Resolve: Object - included following keys (If it's found)
thumb- Base64 image string (video: get first frame, audio: get artwork if exist)duration(video only)width- the thumb widthheight- the thumb height- Others:
Android We using FFmpegMediaMetadataRetriever, see RNMediaMeta.java#L36 for more information.
iOS We using official AVMatadataItem, see RNMediaMeta.m#L9 for more information.
License
0.0.20
6 years ago