0

My app will get all music file from KnownFolders.MusicLibrary, which will return StorageFile, but later I found out there's few Class I can choose to play music file.

What I want is that when I play a list of music file, it can be controlled on the universal volume control (like picture below).

I found BackgroundAudioPlayer Class, BackgroundMediaPlayer Class, MediaPlayer Class, and MediaElement Control. Which one of them is the most suitable Class/Control to play music file?

I'm developing Windows Phone 8.1 Silverlight

enter image description here

wuiyang
  • 409
  • 2
  • 5
  • 18

1 Answers1

2

To do it in the correct way (to allow users play music when your app is un background) you should use backgroundaudioplayer. I used it on Fildo and works great.

SergioZgz
  • 148
  • 5
  • will the music keep on playing when app closed? – wuiyang Dec 02 '15 at 13:28
  • Yes because you launch it on a background service which is managed by system. You could implement it as you want, in my case I have a list of songs and play it randomly. Also you could get an event when a song ends to play the next one, etc. – SergioZgz Dec 02 '15 at 13:34