我目前正在使用BackgroundAudioPlayer构建一个网络电台流媒体应用。
问题在于有些uri不起作用,有些则不行。
工作网址示例:http://lyd.nrk.no/nrk_radio_p2_mp3_h
非工作uri的示例:http://dab.no:2026
这些都可以在电脑上运行......
有谁知道什么可能是错的?
以下是我创建AudioTrack的方法:
新的AudioTrack(新的Uri(“http://dab.no:2026”,UriKind.Absolute),“1 fm”,“Molde”,“”,null,null,EnabledPlayerControls.Pause)
onError返回: System.Exception:-1072875802
如果有人帮忙,我会很高兴:D
问丹尼尔
答案 0 :(得分:1)
我在这篇blog post中写过类似的内容。 基本上,我认为您的问题是您的URL不起作用,正在使用shoutcast流,这需要稍微不同的HTTP请求才能到达流。
试试这个:
new AudioTrack(new Uri("http://dab.no:2026/; stream.mp3"), "1 fm", "Molde", "", null, null, EnabledPlayerControls.Pause)
答案 1 :(得分:0)
看起来不起作用的网址是Windows Phone不支持的媒体格式 - see MSDN for which formats are supported。在这种特殊情况下,广播电台似乎正在使用ShoutCast。