首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OGV文件不播放。Mime类型集,选中Curl,试图在服务器上禁用GZIP

OGV文件不播放。Mime类型集,选中Curl,试图在服务器上禁用GZIP
EN

Stack Overflow用户
提问于 2011-08-29 19:05:00
回答 1查看 1.7K关注 0票数 4

在过去的两天里,我一直在关注许多帖子。Firefox不会在此链接上播放OGV文件,但是在本地服务器上可以正常工作。文件是chmod 777

这在.htaccess文件中:

代码语言:javascript
复制
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

我在这页的顶部有这样的信息:

代码语言:javascript
复制
<?php ini_set('zlib.output_compression', 'Off'); ?>

这是代码:

代码语言:javascript
复制
<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进行了检查,该文件被用作正确的类型:

代码语言:javascript
复制
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

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

代码语言:javascript
复制
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文件,但只在Bytes中下载,并且没有维度。
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-01-10 12:28:01

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

代码语言:javascript
复制
<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>

它现在在所有的浏览器上都很好。

谢谢

Andi

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7234608

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档