简体   繁体   English

Firefox 10.0.1无法播放html mp4视频

[英]Firefox 10.0.1 not playing html mp4 video

I have the following code for playing video into the web page : 我有以下用于将视频播放到网页中的代码:

<video width="420" height="345" controls="controls" autoplay="autoplay">
        <source src="/common/videos/EPyl1LgNtoQ.ogg" type="video/ogg" />
        <source src="/common/videos/EPyl1LgNtoQ.mp4" type="video/mp4" />
          <source src="/common/videos/EPyl1LgNtoQ.webm" type="video/webm" />

        <object width="320" height="240" src="/common/videos/EPyl1LgNtoQ.mp4">
            <embed width="320" height="240" src="/common/videos/EPyl1LgNtoQ.swf">
            Your browser does not support video
            </embed>
        </object>            
    </video>

The file is in .mp4 format and I have firefox 10.0.1 version and chrome 17.0 version. 该文件为.mp4格式,我具有firefox 10.0.1版本和chrome 17.0版本。

The video is playing on chrome but not on firefox. 该视频在Chrome上播放,但在Firefox上不播放。

It displaying player but not playing the video over it. 它显示播放器,但不播放视频。

I want to play it on firefox so how it will play on it. 我想在Firefox上播放它,然后在它上播放。 I am going through lot of tutorials but not finding any solution. 我正在阅读很多教程,但没有找到任何解决方案。

Thanks in advance 提前致谢

Modify your apache .htaccess file like : 修改您的apache .htaccess文件,例如:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
AddType application/x-shockwave-flash swf
AddType video/x-m4v .m4v
AddType video/mp4 .mp4
AddType video/webm .webm
AddType audio/ogg .oga

Try this I hope i'll work for you. 试试这个,希望我能为您工作。

看看videoJS.com-这是基于HTML5视频技术的开源抽象层(具有旧式浏览器的Flash Player后备功能)。

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

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