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

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

问题描述

我一直在努力用我的媒体播放器的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 属性,我可以实现各种事物之间的联系,但我只是'T想法子使它走了。

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手机]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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