.ogg视频没有在firefox中播放

时间:2010-05-03 06:18:40

标签: html5 ogg html5-video

我们刚刚开始使用html5视频,似乎无法在Firefox中播放.ogg个文件,任何提示?以下是我们使用的来源:

<video width="640" height="360" poster="http://video.thewebreel.com/episode_001/episode_001.jpg" controls autoplay autobuffer>
  <source src="http://video.thewebreel.com/episode_001/episode_001.ogg" type="video/ogg" type='video/ogg; codecs="theora, vorbis"'/>
  <source src="http://video.thewebreel.com/episode_001/episode_001.mp4" type="video/mp4" />
</video>

这里可以看到实例:

http://thewebreel.com/2010/05/02/episode-1.html

然而,我们完全感到困惑,一切似乎都是正确的。

4 个答案:

答案 0 :(得分:17)

我将.ogg上传到我的服务器,怀疑它是服务器问题,而且它在我的服务器上正常运行

我猜这是因为您的网络服务器正在回复

Content-type: binary/octet-stream

尝试将mime类型添加到nginx ...

打开Nginx mime类型配置文件,例如:/etc/nginx/mime.types

在最后一个视频mime类型

之后添加这些行
video/ogg                             ogm;
video/ogg                             ogv;
video/ogg                             ogg;

答案 1 :(得分:2)

在上面提到的其中一个链接中,播放ogg文件的正确方法是..

<audio preload="auto" controls="controls">
  <source src="media/song.ogg" type="application/ogg">
</audio>

感谢在这里指出的人。 HTML5 video (mp4 and ogv) problems in Safari and Firefox - but Chrome is all good

答案 2 :(得分:2)

要在服务器上设置的正确mime类型是

AddType audio/ogg .oga (audio oga file)
AddType video/ogg .ogv (video ogv file)
AddType application/ogg .ogg (for audio and video)

来源:

答案 3 :(得分:1)

Ogg视频播放在Firefox 3.6上播放,但不是4.0。

以下是解决方案:视频自动缓冲控制preload =“auto”而非视频控制preload =“none”

这适用于Firefox 3.6和4.0以及现在的MSIE 9!