This project is read-only.

Playlist in the background

Topics: Windows 8 Xaml
Dec 5, 2012 at 11:56 AM

I'm trying to have the MediaPlayer play a playlist in the background (custom - not using the Playlist Plugin).

Using the documented BackgroundCapableMedia and background audio task declaration, I manage to play some audio in the background: the current track continues playing in the background until the end of the track.

The problem I am facing is that when the track ends, the audio stops, and there's no way to move to the next track. I have tried using the MediaEnded event, but it doesn't get called (I suppose because the application is suspended at that point). I also tried with the playlist plugin from Player Framework, but this is the same. I know the Xbox Music app is able to play playlists in the background, so it must be possible. Also this blog post ( mentions the supported scenarios, which include "Local playlist" and "Streaming playlist". There's however no documentation whatsoever about how to achieve that.

Can someone please help me achieving that?


Dec 5, 2012 at 8:13 PM

Good find! I was also able to confirm this and have reported this on the MSDN forums. Feel free to follow the thread there or chime in.

Dec 20, 2012 at 4:02 PM

Seems I am having this same issue.

FWIW, I have an essentially duplicated question posted here =>

I would love to see a solution to this.


Apr 4, 2013 at 1:21 AM
I think a solution might be to set a MediaMarker at the MediaOpened event (can't set one before that event) and use the MediaElement.NaturalDuration there to specify that the marker is at the end. When you get the MarkerReached event for that specific marker you can stop the mediaelement by code