我正在使用 codeplex 中流行的 sl2videoplayer 播放视频,当我在 IIS Web 服务器上播放远程视频时,一切都很好。Sl2videoplayer 可以在这里找到,http://www.codeplex.com/sl2videoplayer
但是当我从磁盘本地打开default.html(双击default.html在IE中打开)时,IE中出现这样的错误消息(IE左下角有警告标志,请参考下面屏幕快照)。sl2videoplayer 中没有代码更改,只是我将媒体文件更改为 Output.wmv,如下所示。有什么想法有什么问题吗?我想要达到的效果是我想使用silverlight播放器播放本地文件而不连接到服务器(当与互联网断开连接时),我们可以使用Siverlight来做到这一点。
我正在使用的 default.html(我将 Output.wmv 复制到 ClientBin 目录中,而 VideoPlayer.xap 位于同一目录中)
<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2" width="500" height="240">
<param name="source" value="ClientBin/VideoPlayer.xap"/>
<param name="onerror" value="onSilverlightError" />
<param name="background" value="white" />
<param name="initParams" value="cc=true,markers=true,markerpath=markers_movie21.xml,m=Output.wmv" />
<a href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a>
</object>
<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
</div>
IE 和相关屏幕快照中的错误消息,
网页错误详情
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; CIBA; .NET CLR 3.5.30729; MS-RTC LM 8; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Fri, 10 Jul 2009 06:20:19 UTC
Message: Unhandled Error in Silverlight 2 Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NotSupportedException: The URI prefix is not recognized.
at VideoPlayer.App.Application_UnhandledException(Object sender, ApplicationUnhandledExceptionEventArgs e)
at MS.Internal.Error.CallApplicationUEHandler(Exception e)
at MS.Internal.Error.GetXresultForUserException(Exception ex)
Line: 53
Char: 13
Code: 0
URI: file:///C:/Test/sl2videoplayer/VideoPlayerWeb/default.html
IE中的屏幕快照,
http://i31.tinypic.com/xgh84i.jpg
提前谢谢,乔治