所以我有3个不同版本的视频,mp4,ogg和webm。在谷歌浏览器中,视频效果很好。在IE和Firefox中,我收到一条消息,说它无法找到正确的文件或路径。
这是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 :(得分:1)
代码 -
<!-- "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>
答案 1 :(得分:0)
你需要在正确的路径中提供带有所提及格式的视频,然后才会播放,尝试转换为特定格式并将其放入正确的路径并尝试或尝试这样
<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>