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!!!!!!

相关文章

如何在Silverlight4(XAML)中绑定IsEnabled属性?我试过简单的...
我正在编写我的第一个vb.net应用程序(但我也会在这里标记c#,...
ProcessFile()是在UIThread上运行还是在单独的线程上运行.如...
我从同行那里听说,对sharepoint的了解对职业生涯有益.我们不...
我正在尝试保存一个类我的类对象的集合.我收到一个错误说明:...
我需要根据Silverlight中的某些配置值设置给定控件的Style.我...