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

artwork on ios is not displayed MediaSession.setMetadata #4

Open juanmaldonadodev opened 1 year ago

juanmaldonadodev commented 1 year ago

Testing integration in iOS. Is not displaying the image correctly:

artwork: [
  { src: 'https://dummyimage.com/96x96',   sizes: '96x96',   type: 'image/png' },
  { src: 'https://dummyimage.com/128x128', sizes: '128x128', type: 'image/png' },
  { src: 'https://dummyimage.com/192x192', sizes: '192x192', type: 'image/png' },
  { src: 'https://dummyimage.com/256x256', sizes: '256x256', type: 'image/png' },
  { src: 'https://dummyimage.com/384x384', sizes: '384x384', type: 'image/png' },
  { src: 'https://dummyimage.com/512x512', sizes: '512x512', type: 'image/png' },
]

I have tested my own images but also with this from the api definition.

The other fields are working well.
mariusbolik commented 1 year ago

Hi @juanico18, this is a bug of Webkit: https://bugs.webkit.org/show_bug.cgi?id=247043 Should be fixed in the next iOS Update.

juanmaldonadodev commented 1 year ago

Thanks @mariusbolik I will check once is fixed by apple

sanderschnydrig commented 1 year ago

This problem still persists in the latest version of iOS 16.2. No artworks are displayed. Any updates on this? @juanico18 did you manage to get this working?

nick-barth commented 1 year ago

Anyone solve this?

juanmaldonadodev commented 1 year ago

@nick-barth we still have that problem.

emmernme commented 9 months ago

Doesn't work here either – also looking for a way to serve local images from the app's assets-folder to MediaSession metadata – does anyone have any idea how to do so?

mikmikmik commented 7 months ago

For me this is working on iOs and android. But local image doesn't show up on android, what path do you use? I use /myfile.jpg or ./myfile.jpg both are working on iOs but not on android.

Philboisvert commented 7 months ago

@emmernme @juanico18 @nick-barth @sanderschnydrig

After a lot of researches, the artwork on IOS doesn't work in the simulator regardless if you're on 17.2 or any versions.

This is a Xcode simulator bug and not a MediaSession API bug, if you deploy on your own iPhone instead of the simulator you'll see that the artwork shows up and the Play icon too (which is also not working in the simulator)

@mariusbolik thanks for sharing the thread, saw the solution from recent comments on it 👍

image