After upgrade iOS to 16.1 and MacOS to Ventura 13.0 (Safari 16.1), mediaSession API stopped showing artwork.
<rdar://problem/101597398>
Could you please provide steps to reproduce? Ideally a reduced test case, but any website that used to work and doesn't now would be fine.
Device used: iPhone 13, iOS 16.02 iPhone 13 Pro Max, iOS 16.1 Browser: Safari mediaSession API sample: https://googlechrome.github.io/samples/media-session/audio.html Result: iOS 16.02 - Lock Screen showing album image while playing music iOS 16.1 - Lock Screen NOT showing album image while playing music All other functions are working fine. (ie. next, previous, play, pause etc.)
Created attachment 463272 [details] Working Example on iOS 16.02
Created attachment 463273 [details] NOT Working Example on iOS 16.1
Pull request: https://github.com/WebKit/WebKit/pull/4023
Pull request: https://github.com/WebKit/WebKit/pull/6300
Committed 256627@main (8f70e6bf626c): <https://commits.webkit.org/256627@main> Reviewed commits have been landed. Closing PR #6300 and removing active labels.
*** Bug 248737 has been marked as a duplicate of this bug. ***
Committed 252432.920@safari-7614-branch (768d89b728fc): <https://commits.webkit.org/252432.920@safari-7614-branch> Reviewed commits have been landed. Closing PR #245 and removing active labels.
macOS 13.1 (22C65) safari 16.2 (18614.3.7.1.5) problem stil persist. Steps to reproduce: 1. Open music.yandex.com 2. Open browser console 3. Paste this code: navigator.mediaSession.metadata = new MediaMetadata({ title: "11111111111", artist: "222222222", album: "3333333333", artwork: [ { src: "https://avatars.yandex.net/get-music-content/5375761/c8e05100.a.19837155-1/200x200" } ]}); 4. Press Enter 5. Open Now playing widget Title, artist, album is set correctly. Cover not set. macOS 12.6.1 Safari 15.6.1 (17613.3.9.1.16) all works as expected.
Created attachment 464053 [details] With fix The fix only landed recently. Try with Safari Technology Preview (https://developer.apple.com/safari/technology-preview/)
(In reply to Jean-Yves Avenard [:jya] from comment #12) > Created attachment 464053 [details] > With fix > > The fix only landed recently. Try with Safari Technology Preview > (https://developer.apple.com/safari/technology-preview/) Strange situation. The Safari Technology Preview has been installed and updated. It only worked after a reinstall.
*** Bug 249961 has been marked as a duplicate of this bug. ***
Has there been a fix found yet for iOS at this point in time?
*** Bug 251782 has been marked as a duplicate of this bug. ***
(In reply to 17rxyz from comment #15) > Has there been a fix found yet for iOS at this point in time? I believe the fix for this shipped last month in iOS 16.3.
Still not working in iOS 16.3
Unfortunately this still appears to be broken on iOS 16.4. MediaMetadata artwork is only displayed if the src image dimensions are valid. If I specify more than one size, the smaller version is also used (pixelated) where a larger version would be preferable.
This seems to still not be working in iOS 17.0 or 17.1.
(In reply to Emil from comment #20) > This seems to still not be working in iOS 17.0 or 17.1. Do you mean you have no artwork at all, or that it's only using the first image in the array of image (bug 265824)
https://googlechrome.github.io/samples/media-session/audio.html does work (showing artwork) for me on an iPhone with iOS 17.2 beta (as mentioned above, expected to work with 16.3 and newer).
(In reply to Jean-Yves Avenard [:jya] from comment #21) > (In reply to Emil from comment #20) > > This seems to still not be working in iOS 17.0 or 17.1. > > Do you mean you have no artwork at all, or that it's only using the first > image in the array of image (bug 265824) It does seem to, in fact, work on a real device. On the iOS 17.0 simulator, the artwork does not show up at all (nor does the Play icon, but it's still clickable). Thanks!
Interesting. I don't know if there is a deep reason for this or if it's a simple bug of some sort in the simulator. Would you be willing to file a new bug about that?