media_metadata 2.1.0
media_metadata: ^2.1.0 copied to clipboard
A Flutter plugin to read metadata from media files (maudio and video) on Android, iOS, macOS, Windows, and Linux.
2.1.0 #
Dependency & Platform Updates #
- Dependencies: Updated
FilePickerversion and removed the Web version inpubspec.yaml. - iOS / macOS: Updated the
.podspecfiles. - Windows: The plugin now utilizes the Shell Property Store to read metadata.
- Example App: Fully updated to reflect all new features and changes.
New Features & Thumbnail Generation #
- Video Thumbnails: Added a new parameter to the read function to explicitly enable preview thumbnail generation for video metadata.
ImageMetadata.isGeneratedProperty: - Returnsfalsefor genuine embedded cover art or standalone image files.- Returns
trueonly for thumbnails generated from a video frame.
- Returns
createThumbnailParameter: (Added toMediaMetadata.read, defaults tofalse):- This only triggers for video files that do not have actual embedded cover art.
- Write Protection:
MediaMetadata.writenow intentionally ignores any image marked withisGenerated: trueto prevent saving a generated thumbnail as if it were genuine cover art.
Platform-Specific Implementation Details #
- Android: Uses
MediaMetadataRetriever.getFrameAtTimefor thumbnail generation. - iOS / macOS: Uses
AVAssetImageGeneratorfor thumbnail generation. Remove the PrivacyInfo file for remove the warning. - Windows: Re-introduced
IShellItemImageFactory—but only under the explicitcreateThumbnailflag and strictly for video extensions (never for audio, and never silently in the background). - Linux: Spawns an
ffmpegsubprocess if installed. Ifffmpegis missing, no thumbnail is generated (does not fall back to a generic icon).
Documentation & UI #
- Example App UI: Added a "Generate thumbnail for videos" toggle switch and a visual "GENERATED" badge on the thumbnail preview when applicable.
- README: Fully rewritten to accurately reflect the current state of the codebase (covering
ImageMetadata, comments, technical audio/video fields,createThumbnail, and Linuxffmpegsetup instructions).
2.0.0 #
- iOS and macOS versions are now functional, and added metadata writing, which is partially functional and MIT Licence.
1.0.0 #
- Initial release of the applicatio