获取当前播放的歌曲列表 Windows Phone 7
我想显示当前播放列表中的歌曲列表,如果用户在我的应用程序中播放音乐,我可以知道正在播放什么播放列表,但如果他们在 zune 应用程序中播放然后切换到我的应用程序,我的歌曲列表将为空,甚至尽管播放列表仍在运行。
例如:如果用户通过 Zune 应用程序在 Windows Phone 7 中播放播放列表,然后他们导航到我的应用程序,我如何获取当前的播放列表?
I want to display the list of songs in current playing lists, If users play music in my app, I could know what playlist is playing but if they were playing in zune app then switch to my app, my song list will be empty, even though the playlists is still running.
For example: if users's playing a playlists in windows phone 7 by Zune app, then they navigate to my App, how do I get that current play lists?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
当前的 Windows Phone 7 API 仅通过 MediaPlayerLauncher,它允许您从应用程序启动媒体。
Mango (7.1) API 允许您与媒体+视频中心集成,但是 API 仍然非常简单。您可以通过 MediaHistory.NowPlaying。
The current Windows Phone 7 APIs only integrate with phone media via the MediaPlayerLauncher, which allows you to launch media from your application.
The Mango (7.1) APIs allow you to integrate with the media + video hub, however, the APIs are still pretty simple. You can determine the currently playing media via MediaHistory.NowPlaying.
MediaHistory.NowPlaying 属于 MediaHistoryItem 类型,具有 Title 和 ImageStream 属性。您可以将标题和图像添加到您的收藏中。
MediaHistory.NowPlaying is of Type MediaHistoryItem which has the Properties Title and ImageStream. You could add the Title and Image to your collection.
您可以使用
Microsoft.Xna.Framework
库中静态类MediaPlayer
的MediaPlayer.Queue
属性You can use
MediaPlayer.Queue
property of static classMediaPlayer
fromMicrosoft.Xna.Framework
library