2014-01-25 76 views
0

所以我有3個不同版本的視頻,MP4,OGG和WebM的。在谷歌瀏覽器中,視頻正常工作。在IE和Firefox,我得到一個消息,說無法找到正確的文件名或路徑。HTML5視頻不是在IE或Firefox的工作,罰款在Chrome

下面是HTML:

<video class="center" controls> 
    <source src="AlderneyBunkerParty2013.mp4" type="video/mp4"> 
    <source src="AlderneyBunkerParty2013.ogg" type="video/ogg"> 
    <source src="AlderneyBunkerParty2013.webm" type="video/webm"> 
    Your browser does not support the video tag. 
    </video> 

該網站是www.alderneybunkerparties.co.uk如果你想看一看。我運行的是最新版本的Firefox和IE 11的我已經包含在我的HTML也是一個墊片。

我已經讀過,用.ogg或.webm結束文件是好的,但文件實際上以.oggtheora.ogv和.webmhd.webm結尾 - 我原本在HTML中包含了這些確切的文件類型,但我得到了與我在.ogg和.webm時得到的錯誤相同。乾杯。

+0

這仍然無法正常工作。如果我需要我怎麼能做到這一點上Godaddy的編輯的MIME類型?我已閱讀有關.htcaccess但不只是爲Apache? – user1663396

回答

1

Try video for everybody

代碼 -

<!-- "Video For Everybody" http://camendesign.com/code/video_for_everybody --> 
<video controls="controls" poster="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg" width="640" height="360"> 
<source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" type="video/mp4" /> 
<source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm" type="video/webm" /> 
<source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv" type="video/ogg" /> 
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="640" height="360"> 
    <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> 
    <param name="allowFullScreen" value="true" /> 
    <param name="wmode" value="transparent" /> 
    <param name="flashVars" value="config={'playlist':['http%3A%2F%2Fsandbox.thewikies.com%2Fvfe-generator%2Fimages%2Fbig-buck-bunny_poster.jpg',{'url':'http%3A%2F%2Fclips.vorwaerts-gmbh.de%2Fbig_buck_bunny.mp4','autoPlay':false}]}" /> 
    <img alt="Big Buck Bunny" src="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg" width="640" height="360" title="No video playback capabilities, please download the video below" /> 
</object> 
</video> 
<p> 
<strong>Download video:</strong> <a href="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4">MP4 format</a> | <a href="http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv">Ogg format</a> | <a href="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm">WebM format</a> 
</p> 
0

你需要有正確path mentioned格式的視頻,那麼只有它會玩,嘗試轉換到特定的格式,並把它在正確的path並嘗試或嘗試像這樣

<video width="320" height="240" controls autoplay> 
    <source src="movie.ogg" type="video/ogg"> 
    <source src="movie.mp4" type="video/mp4"> 
    <object data="movie.mp4" width="320" height="240"> 
    <embed width="320" height="240" src="movie.swf"> 
    </object> 
</video> 
+0

我有MP4,OGG和WebM。我轉換了視頻並上傳了所有3個視頻,但它只能在Chrome中運行。 – user1663396

相關問題