I´m currently building a web radio streaming app using the BackgroundAudioPlayer.
The problem is that some uri´s don´t work, others do..
Example of a working url: http://lyd.nrk.no/nrk_radio_p2_mp3_h
Example of a non working uri: http://dab.no:2026
Both of these work on the computer...
Does anyone know what could be wrong?
Here is how i create the AudioTrack:
new AudioTrack(new Uri("http://dab.no:2026", UriKind.Absolute), "1 fm", "Molde", "", null, null, EnabledPlayerControls.Pause)
T开发者_如何学运维he onError returns: System.Exception: -1072875802
I will be happy very if someone helps :D
Regards Daniel
I wrote about something similar in this blog post. Basically, I think your issue is that your URL that doesn't work, is using a shoutcast stream, which needs a slightly different HTTP request to get to the stream.
Try this:
new AudioTrack(new Uri("http://dab.no:2026/; stream.mp3"), "1 fm", "Molde", "", null, null, EnabledPlayerControls.Pause)
Looks like the URL that doesn't work is of a media format that isn't supported on Windows Phone - see MSDN for which formats are supported. In this specific case the radio station seems to be using ShoutCast.
精彩评论