jofr / capacitor-media-session

Capacitor plugin for media notifications and platform media keys as well as background audio playback.
GNU General Public License v3.0
33 stars 25 forks source link

Is there a way to use artwork from within the app bundle for the metadata? #28

Open sirgatsen opened 4 months ago

sirgatsen commented 4 months ago

I am trying to use artwork that is stored within the app bundle at assets/img/artwork.png and I am not sure if this is supported or not and if it is how do I format that path to the artwork?

PS: I tried just passing in assets/img/artwork.png and it isn't working, I also tried http://localhost/assets/img/artwork.png and it either didn't work or maybe crashed

waltercruz commented 3 months ago

From the code on MediaSessionPlugin.java, it's seems possible to pass a value in the format data:image/png;base64 in the url parameter (not tested)

sirgatsen commented 3 months ago

Thank you sir, I was able to use a base64 string successfully!