safari中的mp4使用htaccess身份验证失败 [英] mp4 in safari fails with htaccess authentication

查看:159
本文介绍了safari中的mp4使用htaccess身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发网站上,我一直在测试mp4文件在Safari浏览器中进行html5播放。即使没有正确的MIME类型声明,本机播放器也能正常加载和播放mp4文件。但是,如果我将AuthType Basic添加到我的.htaccess,则文件失败有时无法播放,有时会在quicktime播放器中播放。

On a dev site, i've been testing mp4 files for html5 play in safari. The native player loads and plays the mp4 files fine, even without the correct MIME type declaration. But, if I add AuthType Basic to my .htaccess the files fail sometimes fail to play and sometimes play in the quicktime player.

使用有效用户登录后,为什么会这样做?这个指令阻止mp4文件正常播放?

After logging in with a valid user why would this directive stop mp4 files from playing correctly?

推荐答案

仍有同样的问题。有些人解决了这个问题,同时将mime类型添加到他们的.htaccess文件中(对我来说不起作用):

still have the same problem. some people solved it, while adding the mime types to their .htaccess file (didn t work for me) :

AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/mp4 .mov
AddType video/webm .webm

现在我使用已经在htaccess中提到的add Satisfy All(请参阅​​下面的代码):

at the moment i m using your already mentioned "add Satisfy All" in htaccess (see code below):

<FilesMatch mp4>
Satisfy any
order allow,deny
allow from all
</FilesMatch>

它不是真正的解决方案,因为现在可以访问文件,如果您知道直接链接到文件...对于我的情况仍然可以,但期待着一个真正的工作解决方案!

it s not really a solution, since the files are now accessible, if you know the direct link to the files...for my case still ok, but looking forward to a real working solution!

这篇关于safari中的mp4使用htaccess身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆