搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Why does Firefox 5 not read HTML5 video tags?

  • 10 回覆
  • 41 有這個問題
  • 3588 次檢視
  • 最近回覆由 susanVH

more options

Been trying to get HTML5 video to work in Firefox 4 and 5. It doesn't work. I've used Fireogg to process the video but all I get is a big "X" on screen. The code I'm using works in Safari, Opera and Chrome. This has been going on for months now and I don't appreciate having to jump thru hoops to do such a simple thing for Firefox. It's absurd. Every other browser works. Check below for the code.

被選擇的解決方法

所有回覆 (10)

more options

Make sure that the server sends the video files with a correct and supported MIME type to make it work in Firefox.

more options

Thanks for responding, sir! By server do you mean I have to get my service provider to configure their servers for Ogg format? The suggestions you put forth have already been incorporated six ways from Sunday in the code I provided. I also tried the "preload" which I had tried before and, like before, it didn't work.

more options

The video on this page is send as text/plain
So you need to change the server configuration as I wrote above.

The server is an Apache server, so use AddType video/ogg .ogv


data:text/html,<object type="application/ogv" data="http://dandridgedrive.com/movies/demo_html5.ogv" width="100%" height="100%"></object>
more options

once again, I appreciate your help on this, however, I need an answer to one thing: do I need to contact my service provider (GoDaddy) and have them add the video/ogg.ogv to their server config? They provide the hosting. I'm not running my own server.

more options

You should be able to update or create an .htaccess file in the root folder of web page (dandridgedrive.com) and add the lines to it.
You can ask the host company for help if you can't manage it yourself.

more options

Cool man...I'll try this out and confirm success!

more options

選擇的解決方法

You're welcome

more options

You da man! Added:

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

to the .htaccess file in the root of my directory and it worked. Not understanding why Firefox needs this particular hoop but I'll certainly spread it around. Thanks for your help!

more options

You're welcome.

Yes, I can confirm that it is now working.

more options

USE SOURCE URL RELATIVE TO ROOT, NOT WEB PAGE!

Talk about picky!!! I had all my server settings correct but the darn ogv clip wouldn't play. The clip and the page were in the same folder, so I just had the filename as the source. Once I made the url for the source relative to the root directory of my website everything worked:

DOESN'T WORK:

    <video poster="/images/seal.png" controls>
       <source src="my_video.ogv" type='video/ogg; codecs="theora, vorbis"' />
     </video>

WORKS:

     <video poster="/images/seal.png" controls>
       <source src="/complete/folder/path/my_video.ogv" type='video/ogg; codecs="theora, vorbis"' />
     </video>

Jeez Louise, Firefox! pffft.

由 susanVH 於 修改