Support artwork as base64 image
What is the need and use case of this feature? Would be nice to support the artwork as base64 image instead of storing the image locally or fetching from the web. I have an app where I fetch the images from the web and store as base64 on the devices database to avoid fetching the image from the web too many times to not trigger the monthly allowance.
It seems currently this library doesnt support images using base64
passing and parsing a base64 string through the JS interface when loading artwork every single time is quite intensive and inefficient as far as RN goes. its recommended to save ur base64 to the app's temp folder via RN blob util or ur faviorite RNFS lib, and load that uri instead.
To be honest, you don't need a big image for artwork anyway. Plus, it's only showing in the player once, so it's not like a list with multiple items. For now, I've managed to cache the images in local storage and pass the URI, but for the small artwork images, I thought Base64 could be ideal.
u do have to pass the artwork strings when u perform TP.add - and if u prefer to handle queues natively, with a typical queue of 50 songs and 50kB per artwork, thats 2.5MB strings u'd have to pass through JS to native. that could give you a 1 second ANR
that aside, if u want to put in some work - u can import the relevant base64 to bitmap methods at the respective TrackToMediaItem function and parse it there. at least for android, mediaItem supports directly using bitmap in addition to URIs. though that means the 2.5MB strings/bitmaps will now persist in RAM until the queue is discarded
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.