简体   繁体   English

.ogg视频无法在Firefox中播放

[英].ogg video not playing in firefox

We're just getting started with html5 video, and cannot seem to get .ogg files to play in Firefox, any tips? 我们刚刚开始使用html5视频,似乎无法让.ogg文件在Firefox中播放,有什么提示吗? Here is the source we are using: 这是我们正在使用的源:

<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>

The live example can be seen here: 现场示例可以在这里看到:

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

However we are totally baffled, everything seems exactly right. 但是,我们完全困惑,一切似乎都是正确的。

I uploaded your .ogg to my server suspecting it was a server issue and it's working fine on my server 我将您的.ogg上载到服务器,怀疑这是服务器问题,并且在我的服务器上工作正常

I'm guessing it's because your web server is replying with 我猜是因为您的网络服务器正在回复

Content-type: binary/octet-stream

Try adding the mime types to nginx... 尝试将mime类型添加到nginx ...

Open up the Nginx mime type configuration file, eg: /etc/nginx/mime.types 打开Nginx MIME类型配置文件,例如:/etc/nginx/mime.types

Add these lines after the last video mime type 在最后一个视频哑剧类型之后添加这些行

video/ogg                             ogm;
video/ogg                             ogv;
video/ogg                             ogg;

In one of the links mentioned, the correct way to play ogg files is.. 在提到的链接之一中,播放ogg文件的正确方法是..

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

Thanks to the person who pointed it out here. 感谢在此指出的人。 HTML5 video (mp4 and ogv) problems in Safari and Firefox - but Chrome is all good Safari和Firefox中的HTML5视频(mp4和ogv)问题-但是Chrome很好

The correct mime types to set on your server are 在服务器上设置的正确的MIME类型是

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

Sources: 资料来源:

Ogg videos play were playing on Firefox 3.6 but not 4.0. Ogg视频播放是在Firefox 3.6而非4.0上播放的。

Here's the solution: video autobuffer controls preload="auto" instead of video controls preload="none" 解决方案如下:视频自动缓冲控件preload =“ auto”,而不是视频控件preload =“ none”

This works in Firefox 3.6 and 4.0 and now MSIE 9! 这适用于Firefox 3.6和4.0,现在适用于MSIE 9!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM