flutter_media_metadata 1.0.0+1 flutter_media_metadata: ^1.0.0+1 copied to clipboard
A Flutter plugin to read metadata of media files.
flutter_media_metadata #
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 #
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 saini123hitesh@gmail.com