我有一個問題,當使用HTML5視頻標籤火狐視頻標籤不合格
我創建了一個示例ASPNET MVC項目,一個頁面(名爲Index)上,我測試視頻標籤
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<video autoplay="true" controls="controls" type="video/mp4" id="vd" >
<source src="/Content/Video/oceans-mini.mp4"></source>
Your browser does not support the <code>video</code> element.
</video>
開始調試這項目,它只有在Safari和Chrome,IE和Firefox下班帶有灰色長方形和一個「X」符號內傾倒......
用螢火蟲來檢查網絡的請求/響應後,我得到這個
[Response]
HTTP/1.1 206 Partial Content
Server: ASP.NET Development Server/10.0.0.0
Date: Tue, 27 Sep 2011 04:35:46 GMT
X-AspNet-Version: 4.0.30319
Content-Range: bytes 0-4484952/4484953
Etag: "1CC78E2DCD83280"
Cache-Control: public
Content-Type: application/octet-stream
Content-Length: 4484953
Connection: Close
爲什麼連接是「關閉」,有沒有在我的項目的任何配置需求
這裏我的web配置/ Web服務器部分,仍然是默認
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>
</system.webServer>
明白任何建議
現在[適用於HTML5音頻和視頻NuGet包,請檢查該鏈接(http://www.nuget.org/packages/MVC4.Video/) – Sender