alexmercerind / flutter_media_metadata

A Flutter plugin to read 🔖 metadata of 🎵 media files. Supports Windows, Linux, macOS, Android, iOS & Web.
MIT License
70 stars 40 forks source link

Uri should be used instead of string on Android #7

Closed nt4f04uNd closed 3 years ago

nt4f04uNd commented 3 years ago

MediaDataRetreiver allows you to fetch contents of files in content:// without direct file path. Currently it's simply not working, because for it to work MediaDataRetreiver must get Uri as parameter for setDataSource

nt4f04uNd commented 3 years ago

actually, it works with setFile, i.e https://developer.android.com/reference/android/media/MediaMetadataRetriever#setDataSource(java.lang.String)

setUri always fails with local paths https://developer.android.com/reference/android/media/MediaMetadataRetriever#setDataSource(java.lang.String,%20java.util.Map%3Cjava.lang.String,%20java.lang.String%3E)