如何使用mediaplayer xna在后台播放我的“播放列表” [英] How to play my 'playlist' in background with mediaplayer xna
问题描述
我正在编写一个能够在后台播放音乐的应用程序。我正在使用媒体播放器和Song(类xnalib),因为不可能将文件放入mediaplayer.queue我无法弄清楚如何在"播放列表"中播放下一首歌。
我我试着通过一个例子让这个场景更清晰:
- 我用媒体播放器播放音乐:MediaPlayer.Play(MysongArray [CurrentIndex]);
- 好了,现在用户把我的应用程序放在后台。
- 但是当MysongArray [CurrentIndex]歌曲结束时如果我的应用程序在后台播放下一首歌怎么玩?
谢谢
p.s。我正在使用Windows Phone 8
这些文章涵盖播放背景音频。 第二个是文件列表。
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394039(v = vs.105).aspx
http://msdn.microsoft.com/en-us/library /windowsphone/develop/hh202978(v=vs.105).aspx
Hi,
I'm programming an app which is able to play music in background. I'm using mediaplayer and Song(class xnalib), well since is not possible put file into mediaplayer.queue I can't figure out how can play next song in the "playlist".
I'll try to make this scenario more clear with an example:
- I play music with mediaplayer: MediaPlayer.Play(MysongArray[CurrentIndex]);
- well now user put my app in background.
- but when MysongArray[CurrentIndex] song is ended how play next song if my application is in background?
thanks
p.s. I'm using Windows Phone 8
These articles cover playing background audio. The second takes a list of files.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394039(v=vs.105).aspx
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202978(v=vs.105).aspx
这篇关于如何使用mediaplayer xna在后台播放我的“播放列表”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!