Reputation: 2665
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
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 .MovePreviouse
to navigate to a next or prev. records respectively.
Upvotes: 1