我使用一个MediaElement在我的Raspberry 3上使用Windows10IOT来流一个HTTP音频流。
触摸屏在一段时间后就会结冰(我还不知道什么时候),大概半小时后,流就停止播放了,这是可以重复的。我必须重新启动应用程序才能让它再次工作。
有什么办法找出这个问题的原因吗?
我检查了Raspberry Pi的内存和错误日志,没有任何结果。由于代码不多,我不知道如何调试这个错误。
我使用以下实现:
XAML:
<MediaElement x:Name="myMediaElement"
AreTransportControlsEnabled="true"
Height="100"
AutoPlay="True"
Grid.Row="1"
VerticalAlignment="Bottom">
<MediaElement.TransportControls>
<MediaTransportControls Style="{StaticResource MyStyle}" IsCompact="True" IsSeekBarVisible="False" />
</MediaElement.TransportControls>
</MediaElement>启动流并设置源:
public MainPage()
{
this.InitializeComponent();
myMediaElement.Source = new Uri("http://mp3stream7.apasf.apa.at:8000/");
myMediaElement.Play();
}UPDATE:在调试模式下从Visual运行应用程序时,我收到错误消息,即不再有网络连接可用,但webinterface (端口8080)仍然可用。
发布于 2017-02-22 03:01:14
这看起来像Visual远程调试器问题。
正如@Jackie所指出的,您可以尝试释放模式并在不进行调试的情况下启动。我用你的音频文件测试了15个小时,结果成功了。
https://stackoverflow.com/questions/42258013
复制相似问题