使用手机存储中的歌曲实现播放列表 [windows phone] [英] Implementing playlists with songs from phone storage [windows phone]

查看:30
本文介绍了使用手机存储中的歌曲实现播放列表 [windows phone]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力解决我的媒体播放器 Windows Phone (7) 应用程序的问题.问题是我似乎无法实现播放列表.

I have been struggling with an issue with my media player windows phone (7) application. The problem is that I can't seem to implement playlists.

我想做的是播放媒体库中的歌曲.这篇文章似乎无意义.

What I want to do is play songs from the media library. This article seems pointless.

我已经尝试进入 SongCollection 类并弄清楚如何创建更多这些东西.似乎是不可能的(没有构造函数,不能强制转换,不能继承).

I've tried getting into the SongCollection class and figure out how to create more of these things. It appears to be impossible (no constructor, can't cast it, can't inherit it).

之后,我尝试在运行我的应用程序中存在的后台音频代理的进程中获取一个对象(直到我发现它是多余的),并一次向媒体播放器提供一首歌.

After that I tried getting an object on the process running the background audio agent that existed in my app (until I discovered it was redundant), and feed the media player one song at a time.

问题是,我不知道媒体播放器何时停止播放.只要我的应用程序在前台,它就可以正常工作,但如果不是,则一切都停止工作,只有媒体播放器继续运行.

Problem is, I don't know when the media player stopped playing. It works ok as long as my app is in the foreground, but when it is not, everything stops working, only the media player keeps going.

有没有我还没想出的方法?在上面的文章中,他们建议 Zune 媒体队列之间存在链接,我认为它是 MediaPlayer.Queue 属性,以及我可以实现的各种东西,但我只是想不出办法去吧.

Is there a way I haven't figured out? In the article above they suggest there is a link between the Zune Media Queue, which I presume is the MediaPlayer.Queue property, and various things I can implement, but I just can't figure a way to make it go.

推荐答案

你应该放弃,因为构建你自己的媒体播放器是一项不可能完成的任务(去过那里,做过).您无法创建播放列表或编辑任何信息,无法替换屏幕音乐控件的默认事件处理程序,除非应用程序当前正在运行,否则您无法在应用程序中获取音乐更改事件.

You should give up since building your own media player is an impossible mission (been there, done that). You cannot create playlists or edit any information, you cannot replace default event handlers for on-screen music controls, you don't get events for music change in your application unless it is currently running.

基本上,您现在可以做的事情真的很有限,而且 WP8 的情况也好不到哪里去.

Basically, it is really limited in what you can do right now and the situation isn't much better with WP8.

我希望在我们获得 Windows Phone 9 时它会减少只读.

I hope that it will be less read-only by the time we get Windows Phone 9.

这篇关于使用手机存储中的歌曲实现播放列表 [windows phone]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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