当前位置:编程学习 > C#/ASP.NET >>

ASP.NET文件下载,在线播放视频的问题

苹果手机用浏览器打开这个地址
http://218.21.212.10/vod/play/mine.mp4 不能播放(显示一个禁止播放的图标),求解!
此地址是asp.net在代码中处理请求自写的HTTP响应,地址经过UrlRouting,目前快播,百度影音,小米、三星手机都能在线播放。

http://218.21.212.10/videos/mine.mp4是实际物理文件地址,苹果手机直接打开此地址可以播放,已测,无悬念,但是

http响应头

HTTP/1.1 200 OK
Date: Mon, 25 Feb 2013 10:23:13 GMT
Server: Microsoft-IIS/6.0
Content-Length: 1826940
Content-Location: http://218.21.212.10/vod/play/mine.mp4
Accept-Ranges: bytes
Cache-Control: public
Last-Modified: Mon, 28 Jan 2013 08:14:10 GMT
ETag: "758d7012a2b27f73e1752e512d165e89"
Content-Type: application/octet-stream

http响应头除了Cache-Control: public一句去不掉之外,其它的跟直接访问物理地址几乎一模一样

安装了快播的朋友 输入地址http://218.21.212.10/ 可以直接用快播看。

输出HTTP头部分的代码

                    Response.StatusCode = 200;

                    //Content-Length
                    Response.AppendHeader("Content-Length", fileLenght.ToString());

                    //ContentType
                    Response.ContentType = GetContentType(fi.Extension);

                    //ContentLocation
                    Response.AppendHeader("Content-Location", Request.Url.AbsoluteUri);

                    //Last-Mondified
                    Response.Cache.SetLastModified(fi.LastWriteTime);

                    Response.AppendHeader("Accept-Ranges", "bytes");

                    //Cache-Control
                    Response.Cache.SetCacheability(HttpCacheability.Public);

                    //ETag
                    Response.Cache.SetETag(fileHash);

                    Response.TransmitFile(FilePath);
                    Response.End();
--------------------编程问答-------------------- 为啥我发的问题都没有回答? --------------------编程问答-------------------- 或许没高手看到! --------------------编程问答-------------------- 跪求高手现身!!! --------------------编程问答--------------------
就没有知道的吗??? --------------------编程问答-------------------- 帮你顶上去 --------------------编程问答-------------------- 求解  顶你个肺 --------------------编程问答-------------------- 貌似需要使用 HLS(HTTP Live Streaming) 技术才可以实现
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,