html - OGV 文件未播放。 Mime 类型设置,选中 Curl,尝试在服务器上禁用 GZIP

标签 html

过去两天我关注了很多帖子。 Firefox 不会在 this link 上播放 OGV 文件,但在本地服务器上运行良好。该文件是 chmod 777

这是在 .htaccess 文件中:

SetEnv no-gzip dont-vary
RewriteRule . - [E=no-gzip:0]

<FilesMatch "^(?!.*\.ogg$|.*\.ogv$).+" >
    <IfModule filter_module>
        FilterDeclare   COMPRESS
        FilterProvider  COMPRESS  DEFLATE env=notogg true
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
        FilterChain     COMPRESS
        FilterProtocol  COMPRESS  change=yes;byteranges=no
    </IfModule>
</FilesMatch>

AddType audio/ogg .oga .ogg
AddType video/ogg .ogv
AddType application/ogg .ogg
AddType video/webm .webm
AddType video/mp4 .mp4

我在页面顶部有这个:

<?php ini_set('zlib.output_compression', 'Off'); ?>

这是代码:

<video width="720" height="405" controls autoplay preload >     
    <source src="beautiful_soul_aw111.mp4" type='video/mp4' />
    <source src="beautiful_soul_aw11.m4v" type='video/mp4' />
    <source src="beautiful_soul_aw11.ogv" type='video/ogg' />
    <source src="beautiful_soul_aw11.webm" type='video/webm' />
</video>

当我执行 phpinfo 时,我发现服务器忽略了我关闭 gzip 的请求。

我使用 curl 进行了检查,文件类型正确:

curl -I http://www.beautiful-soul.co.uk/collections/beautiful_soul_aw11.ogv
HTTP/1.1 200 OK
Date: Mon, 29 Aug 2011 18:44:03 GMT
Server: Apache/2
Last-Modified: Mon, 29 Aug 2011 17:44:49 GMT
ETag: "36976a8-4aba873976640"
Accept-Ranges: bytes
Content-Length: 57243304
Content-Type: video/ogg

当我查看页面并获取页面信息时,它显示如下:

Location: http://www.beautiful-soul.co.uk/collections/beautiful_soul_aw11.ogv
Type: video/ogg
Size: 8 KB (8192 bytes)
Dimensions: 0px × 0px
Associated Text: AC_FL_RunContent(...

我不知道为什么。

  1. 我的 .htaccess 文件将被忽略,GZIP 仍处于启用状态。
  2. 为什么找到 OGV 文件但仅以字节为单位下载且没有尺寸。

最佳答案

是的,很抱歉回复晚了。我重新安装/更新了 Firefox。这是通过取出 ogg 版本解决的

<video width="720" height="405"  preload controls autoplay >

    <source src="beautiful_soul_aw111.mp4" type='video/mp4' />
    <source src="beautiful_soul_aw11.m4v" type='video/mp4' />
    <!--<source src="beautiful_soul_aw11.ogv" type='video/ogg' />-->
    <source src="beautiful_soul_aw11.webm" type='video/webm' />
 </video>

它现在在所有浏览器中都能正常播放。

谢谢

安迪

关于html - OGV 文件未播放。 Mime 类型设置,选中 Curl,尝试在服务器上禁用 GZIP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7234608/

相关文章:

javascript - 如何在父跨度内放置无序列表,我的跳到下一行而不是向下流动

html - 并非所有列表项都正确 float

javascript - 处理 Angular 5 组件中的模型更改(双向绑定(bind))

html - Bootstrap 3 右对齐按钮

php - 如何选择多个文件上传?

jquery - 使用 Jquery 从 HTML 数组中获取值

html - 导航标题中带有图标的 Bootstrap 搜索字段未正确显示

javascript - 如何在 react 中获得返回的 div 的偏移量/位置?

html - 为什么 ".post p:first-child"没有从我的 HTML 代码中选择我想要的内容(文章)?

javascript - 如何将值添加到从数组加载的 <option> 标记