当我把我的SmoothStreamingSource,然后调用.Play()我得到下面的异常...SmoothStreamingMediaElement.Play() - 抛出异常,但玩家开始
“玩的不是时候没有源组所允许。 “
奇怪的是,如果我处理这个异常(如下面的代码所示),视频确实开始播放。奇?根据msdn,SmoothStreamingSource属性自动设置Source属性,所以我不应该得到一个异常。逐句通过代码确认Source属性在设置SmoothStreamingSource属性后设置。
我宁愿不只是处理异常,如果这是内部更大的问题的标志,继续我的快乐方式。
这是怎么回事?我的代码...
try
{
Uri uri = (Uri)((Button)source).Tag;
smoothStreamingMediaElement1.SmoothStreamingSource = uri;
if (smoothStreamingMediaElement1.SmoothStreamingSource != null)
MessageBox.Show(smoothStreamingMediaElement1.SmoothStreamingSource.ToString());
else
MessageBox.Show("SmoothStreamingSource is NULL");
smoothStreamingMediaElement1.Play();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
我从1.1到1.5平滑的客户端后,我有同样的问题...似乎没有人使用这些功能... –