Skip to content

A Flutter plugin to read πŸ”– metadata of 🎡 media files. Supports Windows, Linux & Android.

License

Notifications You must be signed in to change notification settings

DiscombobulatedDrag/flutter_media_metadata

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

A Flutter plugin to read πŸ”– metadata of 🎡 media files.

Install

Add in your pubspec.yaml.

dependencies:
  ...
  flutter_media_metadata: ^1.0.0

Example app running on Windows.

Support

Support via PayPal

Buy Me A Coffee

Please consider buying me a coffee if you like the plugin.

Documentation

Windows, Linux, macOS, Android & iOS

final metadata = await MetadataRetriever.fromFile(File(filePath));

String? trackName = metadata.trackName;
List<String>? trackArtistNames = metadata.trackArtistNames;
String? albumName = metadata.albumName;
String? albumArtistName = metadata.albumArtistName;
int? trackNumber = metadata.trackNumber;
int? albumLength = metadata.albumLength;
int? year = metadata.year;
String? genre = metadata.genre;
String? authorName = metadata.authorName;
String? writerName = metadata.writerName;
int? discNumber = metadata.discNumber;
String? mimeType = metadata.mimeType;
int? trackDuration = metadata.trackDuration;
int? bitrate = metadata.bitrate;
Uint8List? albumArt = metadata.albumArt;

Web

For using the plugin on web, add following line to your index.html.

   <link rel="manifest" href="manifest.json">
 </head>
 <body>
+  <script type="text/javascript" src="https://unpkg.com/mediainfo.js/dist/mediainfo.min.js"></script>
   <!-- This script installs service_worker.js to provide PWA functionality to
        application. For more information, see:
        https://developers.google.com/web/fundamentals/primers/service-workers -->
   <script>
     var serviceWorkerVersion = null;
     var scriptLoaded = false;

And use MetadataRetriever.fromBytes instead of MetadataRetriever.fromFile.

Platforms

Platform Status Author/Maintainer
Windows βœ”οΈ Hitesh Kumar Saini
Linux βœ”οΈ Hitesh Kumar Saini
Android βœ”οΈ Hitesh Kumar Saini
Web βœ”οΈ Hitesh Kumar Saini
MacOS βœ”οΈ @DiscombobulatedDrag
iOS βœ”οΈ @DiscombobulatedDrag

Example app running on Web.

Example app running on Android.

Example app running on Linux.

License

This library & work under this repository is MIT licensed.

Copyright (c) 2021-2022 Hitesh Kumar Saini [email protected]

About

A Flutter plugin to read πŸ”– metadata of 🎡 media files. Supports Windows, Linux & Android.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 33.6%
  • Dart 18.8%
  • Swift 18.4%
  • CMake 14.7%
  • Ruby 4.0%
  • Java 3.8%
  • Other 6.7%