File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -77,13 +77,15 @@ public void SetMetadata(AVPlayerItem? playerItem, IMediaElement? mediaElement)
7777 return ;
7878 }
7979
80+ var url = mediaElement . MetadataArtworkUrl ;
81+
8082 NowPlayingInfo . Title = mediaElement . MetadataTitle ;
8183 NowPlayingInfo . Artist = mediaElement . MetadataArtist ;
8284 NowPlayingInfo . PlaybackDuration = playerItem ? . Duration . Seconds ?? 0 ;
8385 NowPlayingInfo . IsLiveStream = false ;
8486 NowPlayingInfo . PlaybackRate = mediaElement . Speed ;
8587 NowPlayingInfo . ElapsedPlaybackTime = playerItem ? . CurrentTime . Seconds ?? 0 ;
86- NowPlayingInfo . Artwork = new ( boundsSize : new ( 320 , 240 ) , requestHandler : _ => GetImage ( mediaElement . MetadataArtworkUrl ) ) ;
88+ NowPlayingInfo . Artwork = new ( boundsSize : new ( 320 , 240 ) , requestHandler : _ => GetImage ( url ) ) ;
8789 MPNowPlayingInfoCenter . DefaultCenter . NowPlaying = NowPlayingInfo ;
8890 }
8991
You can’t perform that action at this time.
0 commit comments