artUri property
The artwork URI for this media item.
Supported types of URIs are:
- File - file://
- Network - http:// https:// etc.
- Android content URIs - content://
Speeding up Android content URI loading
For Android content:// URIs, the plugin by default uses
ContentResolver.openFileDescriptor
, which takes the direct URI of an
image.
On Android API >= 29 there is ContentResolver.loadThumbnail
function
which takes a URI of some content (for example, a song from MediaStore
),
and returns a thumbnail for it.
It is noticeably faster to use this function. You can enable this by
putting a loadThumbnailUri
key into the extras. If loadThumbnail
is
not available, it will just fallback to using openFileDescriptor
.
Implementation
final Uri? artUri;