I am looking to play a Track's Sample URI returned to me from my MusicClient request of the Top song's with no success
Nothing exciting here .. just enumerating the results from the music client's response and storing them in my view model for databinding in a long list selector on a XAML page.
// Init the client
MusicClient client = new MusicClient(clientID);
// Grab the responses async
var responses = await client.GetTopArtistsAsync();
// Loop thru and build our model for databinding
foreach (var v in responses)
ArtistModel model = new ArtistModel();
model.SampleUri = client.GetTrackSampleUri(v.Id);
// Add them to my view model for my XAML page
Now I have on the page created a MediaElement and when they click on one of the databound results returned from the MusicClient I do the following
The media element returns a error code of 3100 ..
// Set the source for our media element
mediaElement.Source = model.SampleUri;
// play the content at said URI location on the internet
How else are we supposed to treat these returned URI's? Are they g-zip'd .. is it just a data stream I should be using WebClient to pack into a stream and use XNA's media player to play it? ..
Any help with this would be greatly appreciated .. thanks