使用Silverlight实现流畅的流媒体播放器,是否可以将mediaurl设置为相对路径?
这是我的代码
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="70%" height="70%">
<param name="source" value="Video/SmoothStreamingPlayer.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="InitParams" value="selectedcaptionstream=textstream_eng,mediaurl=http://servername/Video/video.ssm/manifest" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
</div>
问题: 是否可以将 mediaurl 属性设置为相对路径? 因此,而不是
http://servername/Video/video.ssm/manifest
它会是这样的
/Video/video.ssm/manifest
我按原样尝试过,但出错了。
谢谢!
Here is my code
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="70%" height="70%">
<param name="source" value="Video/SmoothStreamingPlayer.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="true" />
<param name="InitParams" value="selectedcaptionstream=textstream_eng,mediaurl=http://servername/Video/video.ssm/manifest" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
</div>
Question:
Is it possible to have mediaurl attribute set to a relative path?
So instead of
http://servername/Video/video.ssm/manifest
It would be something like
/Video/video.ssm/manifest
I tried it as is, but it errored out.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,媒体必须直接通过 IIS 提供服务
No, the media must be served directly via IIS