Album art not showing when using AudioPlaybackAgent in WP7?

两盒软妹~` 提交于 2019-12-11 15:28:15

问题


when using the AudioPlaybackAgent in WP7 I create a track before playing it. Now when I create the track everything transfers: the file, the title, the artist, and the album, but for some reason when I navigate to the Music and Video Hub on the phone the AlbumArt never shows up.

Here's my code:

AudioTrack audioTrack = new AudioTrack();
audioTrack.BeginEdit();
audioTrack.Source = new Uri(track.Attribute("source").Value);
audioTrack.Title = track.Attribute("title").Value;
audioTrack.Artist = track.Attribute("artist").Value;
audioTrack.Album = track.Attribute("album").Value;
audioTrack.AlbumArt = new Uri(track.Attribute("albumArt").Value);
audioTrack.EndEdit();

NOTE: The track.Attribute is just extracting the values from an xml file. I did debug this and the correct paths are in there and all data is being returned just fine. Any idea why It isn't showing up? Is this even possible?


回答1:


Is the image present in the isolated storage under the shared/media directory?

As per MSDN:

If you copy the image file into isolated storage under the shared/media directory and set this property, the album art will automatically be displayed in the Now Playing tile in the Music + Videos Hub.



来源:https://stackoverflow.com/questions/7828118/album-art-not-showing-when-using-audioplaybackagent-in-wp7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!