微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

silverlight流媒体播放无法progressive download的BUG解决方案

现象:

silverlight播放器播放同样的mp4,放到不同的流媒体服务器上,有的可以支持progressive download(边下边播,随机seek),有的不行(需要整个下载完了才能开始播放或者无法随机seek)。


解决方案:

修改流媒体服务器(HTTP服务器)的配置,将返回的http header的版本号由http/1.0改为http/1.1


原因:

silverlight的BUG,一直未修复,见MSDN上的讨论:https://social.msdn.microsoft.com/Forums/silverlight/zh-TW/441623fd-a5cf-41bd-9c63-9da6c9cebffb/about-the-buffer-of-silverlight-progressive-download?forum=silverlightmedia


OK I've made more progress on this.

Turns out that its an Accept-Ranges vs HTTP/1.0 header issue.

Good: If the server returns a response to an http/1.1 request with an http1.1 response header containing the Accept-Ranges as bytes,then everything works fine and seeking in a progressively download file rocks.

Bad:  If the server returns a response to an http/1.1 request with an http1.0!!!! response header but the 1.0 header still contains the Accept-Ranges as bytes,Silverlight assumes the 1.0 header means that the Accept-Ranges field will not be in the header and therefore never looks for it and therefore it never makes any more http request when the seek is occurs. This is exactly what cloudfront is doing and it's not going to change because it's perfectly legal to return a 1.0 header from a 1.1 request but contains 1.1 fields. https://forums.aws.amazon.com/message.jspa?messageID=166533

So I declare this as a Silverlight bug!!!!!!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐