Jose
Jose

Reputation: 63

HTML5 Video not Working on Firefox

I can't seem to get the HTML5 video working on the latest version of Mozilla Firefox. It's working on Internet Explorer, Chrome and Safari. Here's the source code

<video id="video" muted autoplay poster="uploads/toaf-video.jpg" controls loop="loop">
 <source src="uploads/toaf2014.mp4" type="video/mp4" />
</video>

Thanks,

Upvotes: 0

Views: 295

Answers (2)

Aamir Shahzad
Aamir Shahzad

Reputation: 6834

Try supplying multiple formats to overcome format compatibility differences in different browsers.

<video id="video" muted autoplay poster="uploads/toaf-video.jpg" controls loop="loop">
  <source src="uploads/toaf2014.mp4" type="video/mp4">
  <source src="uploads/toaf2014.ogg" type="video/ogg">
  <source src="uploads/toaf2014.webm" type="video/webm" />
  Your browser does not support HTML5 video.
</video>

Why Different formats?

  1. Firefox 3.5+, Opera 10.5+ and Chrome 3+ support ogv
  2. Firefox 4+, Opera 10.6+ and Chrome 6+ support WebM (and ogv, assuming they don’t drop support in future)

Or Use the flash video to support all major browsers.

Upvotes: 2

Jose
Jose

Reputation: 63

Looks like I just had an additional format OGV and WebM.

Upvotes: 0

Related Questions