Package Exports
- react-native-ffmpeg-media-metadata-retriever
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-ffmpeg-media-metadata-retriever) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-ffmpeg-media-metadata-retriever
Wraps FFmpegMediaMetadataRetriever for React Native.
Installation
npm install react-native-ffmpeg-media-metadata-retrieverAndroid
- in
android/app/build.gradle:
dependencies {
...
+ implementation project(':reactnativeffmpegmediametadataretriever')
}- in
android/settings.gradle
+ include ':reactnativeffmpegmediametadataretriever'
+ project(':reactnativeffmpegmediametadataretriever').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ffmpeg-media-metadata-retriever/android')iOS
Currently, iOS is not supported.
Windows
Currently, Windows is not supported.
Usage
import fs from 'react-native-fs';
import readdirp from 'react-native-readdirp';
import FfmpegMediaMetadataRetriever from 'react-native-ffmpeg-media-metadata-retriever';
const uri = fs.ExternalStorageDirectoryPath + '/Music';
readdirp(uri).forEach(async (file) => {
const metadata = await FfmpegMediaMetadataRetriever.getMetadata(
file.path,
['title', 'artist']
));
console.log(`${metadata.artist} - ${metadata.title}`);
});Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT