All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project attempts to adhere to Semantic Versioning.
0.8.0 - 2025-02-13
- We now also consider saving covers classified as
"32x32 pixels 'file icon' (PNG only)"
when usinggetArtwork()
.- The order of priority is:
"Cover (front)"
→"Other"
→"32x32 pixels 'file icon' (PNG only)"
.
- The order of priority is:
0.7.5 - 2025-02-13
- Ensure we don't return
trackNumber = 0
when getting the metadata usingMetadataRetriever
.- This matches the behavior we do with
MediaMetadataRetriever
.
- This matches the behavior we do with
0.7.4 - 2025-02-10
- Error thrown when trying to read metadata from a file that contains a
%
in its filename.- If we had
%20
in the filename, it'll get incorrectly decoded to a space (
- If we had
0.7.3 - 2025-02-06
- Bumped AndroidX media3 to
1.5.1
from1.5.0
. - Release
MediaMetadataRetriever
resources ingetMetadata()
after we're done with it.
- Issue where
MetadataRetriever
doesn't find the disc & track number for.flac
files. - Issue where
MediaMetadataRetriever
incorrectly parses some characters from.flac
files.
0.7.2 - 2025-01-31
- Parsing issue with
year
metadata field if we have an invalid value that's less than 4 characters long. - Error thrown when trying to read metadata from a file that contains a
?
or#
in its filename.
0.7.1 - 2024-12-10
- Add fallback to
PrimaryDirectoryPath
&StorageVolumesDirectoryPaths
to be"/storage/emulated/0"
&["/storage/emulated/0"]
respectively. - Mark
MusicDirectoryPath
as deprecated mainly due to not specifying a fallback (ie: it may benull
).- Will be removed in
v1.0.0
.
- Will be removed in
- Attempt to fix
stacktrace: com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get for prop 'MetadataRetriever': java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
that occurs on some devices.- We don't have a device to replicate this issue so we're kind of going in blind.
- Fallback to using
MediaMetadataRetriever
if bitrate isn't found or if the value isn't "correct".- Bitrate isn't present in
Format
for.flac
files and I've seen variable bitrate for.mp3
returned as64000
, which is incorrect. - The reason for these issues may be related to this issue comment.
- Bitrate isn't present in
0.7.0 - 2024-12-07
Note
Use v0.6.0
if you don't want the previous targetSdkVersion
or compileSdkVersion
to change.
- Bumped AndroidX media3 to
1.5.0
from1.4.1
.- Requires setting
compileSdkVersion=35
& patchingexpo-modules-core
due to Kotlin type errors.
- Requires setting
- Validate compatibility with React Native 0.76.
- A patch file was required to get the example working due to monorepo behaviors.
0.6.2 - 2025-01-31
- Parsing issue with
year
metadata field if we have an invalid value that's less than 4 characters long. - Error thrown when trying to read metadata from a file that contains a
?
or#
in its filename.
0.6.1 - 2024-12-10
- Add fallback to
PrimaryDirectoryPath
&StorageVolumesDirectoryPaths
to be"/storage/emulated/0"
&["/storage/emulated/0"]
respectively. - Mark
MusicDirectoryPath
as deprecated mainly due to not specifying a fallback (ie: it may benull
).- Will be removed in
v1.0.0
.
- Will be removed in
- Attempt to fix
stacktrace: com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get for prop 'MetadataRetriever': java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
that occurs on some devices.- We don't have a device to replicate this issue so we're kind of going in blind.
- Fallback to using
MediaMetadataRetriever
if bitrate isn't found or if the value isn't "correct".- Bitrate isn't present in
Format
for.flac
files and I've seen variable bitrate for.mp3
returned as64000
, which is incorrect. - The reason for these issues may be related to this issue comment.
- Bitrate isn't present in
0.6.0 - 2024-12-07
Note
This will be followed by v0.7.0
which will update AndroidX media3 to 1.5.0
, which requires setting the compiled SDK version to 35.
- Set max cap of size of base64 image returned from
getArtwork()
to5MB
(this means capping the image found to3.75MB
due to converting a byte array to a base64 string increasing the size by 33-37%).- This should further reduce the risk of
OutOfMemoryError
and will catch extreme cases such as trying to convert massive byte arrays (ie: >50MB) to a base64 string.
- This should further reduce the risk of
- Workaround with supporting other metadata fields in
.flac
files by utilizingMediaMetadataRetriever
.- Someone noticed that track numbers were missing with
.flac
files. Upon further investigation, we've also seen that thediscNumber
value was also missing. This was not the case when usingMediaMetadataRetriever
. - Will like to implement a better fix in the future.
- Someone noticed that track numbers were missing with
EXPO_UNSTABLE_CORE_AUTOLINKING=1
(mentioned in 0.3.0) is no longer needed in the.env
file for the Expo example with[email protected]
.- Narrowed down to this causing crashing in the production app and the development version showing a white screen.
0.5.0 - 2024-09-21
- Switched to
String.toIntOrNull()
to preventNumberFormatException
caused by incorrect metadata structure. getArtwork
only attempts to read the 1st "Other" picture type (instead of overriding previous values if they existed).- Updated how we rejected promises.
- I wonder if the cause of the
message
field of the error received in React beingnull
is due to the use of the followingpromise.reject
format:promise.reject(code: String, throwable: Throwable?)
- I wonder if the cause of the
- Fixed
No suitable media source factory found for content type: 2
error due to missing modules to support theHLS
stream.- Added modules for
DASH
,SmoothStreaming
, andRTSP
as well.
- Added modules for
0.4.0 - 2024-09-08
- Bumped AndroidX media3 to
1.4.1
from1.3.1
.
- Ensure "year" field returns a year.
- Reduce risk of
OutOfMemoryError
due to trying to convert a large byte array representing an image into a base64 string.
0.3.0 - 2024-09-01
- No longer provide
Unknown ExecutionException
&Metadata Retrieval Error
message with promise rejection for unknown errors (ie: now default to the message in the error object). - Support React Native 0.75.
- For the Expo example to work (as I've encountered
ERROR: autolinkLibrariesFromCommand: process cmd /c npx @react-native-community/cli config exited with error code: 1
), you needEXPO_UNSTABLE_CORE_AUTOLINKING=1
in your.env
file. Not sure if this is needed in a production app.
- For the Expo example to work (as I've encountered
- Issue where an app using this package crashes in Android 7 to 10. This was due to the
StorageVolume.getDirectory()
being introduced in Android 11.
- Document
PrimaryDirectoryPath
inREADME.md
.
0.2.2 - 2024-08-06
- New
PrimaryDirectoryPath
exported variable.
0.2.1 - 2024-07-26
- New custom
year
metadata field that returns:recordingYear
->releaseYear
-> year parsed fromMediaMetadataRetriever
'sDATE
field. - New
album
metadata preset.
0.2.0 - 2024-07-26
- Changed package id to
com.cyanchill.missingcore.metadataretriever
fromcom.missingcore.metadataretriever
(ie: to a domain we control).
0.1.0 - 2024-07-25
- Getting metadata supported by
MediaMetadata
API & a subset from theFormat
API. - Getting image of media from its uri as a base64 string.
- Add fallback to
MediaMetadataRetriever
if we failed to get metadata withMetadataRetriever
(ie: ID3v1 metadata) - Ensure compatibility with both new & old architecture.
Add section to make release-it
not complain that this is missing. 2024-07-20 is when we really started working on this repository.