开发者

Firefox 4 Not Playing HTML5 Video When On Server

I've been working on a project which has an HTML5 v开发者_如何学Goideo embedded. It works locally, but when I put it on a server (or in this case, MAMP) it doesn't play. If I right click on the video, it will let me save the video file but it never plays on the page. The particular video in question has no controls, but when I added another test video with controls it had an X in the center.

I'm serving H264, WebM, and Theora. The same videos play perfectly fine in Chrome or Safari.

Any security issues I'm missing? Also, any idea why Firefox is the only browser that refuses to loop the video while the others do?

Thanks in advance.


My assumption is that for whatever reason Firefox is seeing it as a video possibly to the MIME type being sent by the server. If you're on an Apache-based server, you can add the following to your .htaccess to ensure the correct MIME types are being sent.

AddType video/ogg ogv
AddType video/mp4 mp4
AddType video/webm webm


Just change .theora.ogv to .theora.ogg.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜