在 WP7 中使用 AudioPlaybackAgent 时专辑封面不显示? [英] Album art not showing when using AudioPlaybackAgent in WP7?

查看:13
本文介绍了在 WP7 中使用 AudioPlaybackAgent 时专辑封面不显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 WP7 中使用 AudioPlaybackAgent 时,我会在播放之前创建一个曲目.现在,当我创建曲目时,所有内容都会传输:文件、标题、艺术家和专辑,但由于某种原因,当我在手机上导航到音乐和视频中心时,AlbumArt 从未出现.

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.

这是我的代码:

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();

注意:track.Attribute 只是从 xml 文件中提取值.我确实调试了这个,正确的路径在那里,所有数据都被很好地返回.知道为什么它没有出现吗?这甚至可能吗?

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?

推荐答案

图片是否存在于 shared/media 目录下的隔离存储中?

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

根据 MSDN:

如果您将图像文件复制到shared/media 目录并设置此属性,专辑封面将自动显示在音乐 + 的正在播放"磁贴中视频中心.

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.

这篇关于在 WP7 中使用 AudioPlaybackAgent 时专辑封面不显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆