I want some help on streaming an audio content on Windows8.I have several URL’s which i need to play.Not sure if there is any ready to use API for this or anything else.
Can anyone please help ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
Combine this with this.
Basically you create an instance of the
MediaElementclass with a URI likeUri targetUri = new Uri(@"http://www.bing.com");which points to your audio.Since you mentioned “several URLs” you’ll need to create some sort of “playlist” (which may just be a collection of URLs). You can subscribe to the MediaEnded event of the MediaElement to know when to go to the next track. You’ll also want to subscribe to the MediaFailed event in case the network goes down, the audio file is deleted or the audio file is using an unsupported codec.
Finally, consider adding support for audio to continue running in the background even when your application is not focused. This thread should help.