Nghia Nguyen
Nghia Nguyen

Reputation: 2665

How to add a song in Zune hub to "now playing"

In music hub there is a function call "add to now playing" when you press and hold on a song title.

I want to do something similar to this to add a song from a list to now playing list.

How can I do this by code? I couldn't find any method from SongCollection and MediaPlayer in Windows Phone 7.

The example from this link: http://msdn.microsoft.com/en-us/library/ff769558%28v=vs.92%29.aspx only show how to add the song to the historyItem in Zune Hub.

Upvotes: 0

Views: 667

Answers (1)

Maxim V. Pavlov
Maxim V. Pavlov

Reputation: 10509

Currently, you can't do this from your application. You can only use MediaPlayer to play a selected song, but not to queue it.

What you can do thou, is to call MediaPlayer.Play passing a custom SongCollection as a parameter, and then use .MoveNext and .MovePreviouseto navigate to a next or prev. records respectively.

Upvotes: 1

Related Questions