windows Phone 后台播放器分享
我正在开发一个带有基于 Windows Phone 7.1 项目模板的后台播放器的 Windows Phone 应用程序(所以我有 2 个项目)。我的问题是如何动态设置后台播放器播放的曲目列表?我尝试了静态字段,但没有用,我的猜测是我必须在 app.xaml 中定义资源,但它到底是如何完成的?我需要共享一个列表和一个整数。
感谢您的帮助!
I'm developing a windows phone app with a background player based on the windows phone 7.1 project template(so i have 2 projects). My question is how i dynamically set the list of tracks for the background player to play? I tried static fields but didn't work and my guess is that i have to define a resource in the app.xaml but how it is done exactly? I need to share a List and an integer.
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
音频代理将无法读取
App
对象 (app.xaml) 中的任何资源。据我所知,应用程序和背景音频之间进行通信的唯一方法是通过
BackgroundAudioPlayer.Instance
对象,即AudioTrack
(特别参见Tag
属性)并使用存储在独立存储中的文件。MSDN 此处对此进行了描述。
另请查看 MSDN 代码中的背景音频播放器样本。
The audio agent won't be able to read any resources in the
App
object (app.xaml).As far as I can see the only way to communicate between your app and the background audio is via the
BackgroundAudioPlayer.Instance
object, theAudioTrack
(see especially theTag
property) and using files stored in Isolated Storage.This is described on MSDN here.
Also check out the Background Audio player in the MSDN code samples.