Skip to content

v2.0.0

Choose a tag to compare

@cyanChill cyanChill released this 26 Sep 20:58
· 58 commits to main since this release

❗ Breaking Changes

  • Remove additional fallback when getting the year metadata field for MetadataRetriever method.
    • No longer fallbacks to using MediaMetadataRetriever if everything else fails.
  • Remove MediaMetadataPublicFields array & type export.

🎉 Added

  • New updateConfigs function.
    • Customize the max size of the returned base64 image with the maxImageSizeMB option.
  • New getBulkMetadata function.
    • Slightly different than getMetadata as this function won't throw an error. It'll return an object with 2 fields, results & errors which contain an array of objects containing the URI & data/error associated with it.
    • Note: Might be slower than using getMetadata + Promise.allSettled if you do other things after getting the metadata.
  • New saveArtwork function.
    • Allows the user to save the embedded artwork to a file and optionally compress it to save on space.

⚙️ Internal Changes

  • Reorganization of code.
    • Now "normalize" and put all the field-value pairs inside a map, which we then send the ones we want to return.
  • Ensure we release MetadataRetriever & MediaMetadataRetriever when we're done using them.
  • Updated example app to use getBulkMetadata & saveArtwork instead of getMetadata.
  • Flatten examples/* to single example folder.
  • Use BaseReactPackage instead of deprecated TurboReactPackage.