Frage

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)

The onError returns: System.Exception: -1072875802

I will be happy very if someone helps :D

Regards Daniel

War es hilfreich?

Lösung

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)

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top