2

For some reason, my HTML 5 element is not working for me on Mozilla Firefox.

The control buttons of the video do show up, but when I press play nothing happens.

It works perfectly on chrome though. Here is my code:

            <video width="100%" controls="controls">
                <source src= "video/myvideo.mp4" type="video/mp4">
                <source src="video/myvideo.webmhd.webm" type="video/webm">
            </video>

Can you help me find out the reason why it is not working please?

EDIT: My problem is that if I press the play button the video won't play... but if I press the time bar, the video plays. How can I make it start by pressing the play button?

Goaler444
  • 2,591
  • 6
  • 35
  • 53

4 Answers4

1

mozilla don't support mp4

you can see it here https://developer.mozilla.org/en-US/docs/Media_formats_supported_by_the_audio_and_video_elements

Daniel Ezra
  • 1,424
  • 3
  • 14
  • 21
1

The controls attribute for the <video> tag is a boolean. Just use

<video width="100%" controls>

or

<video width="100%" controls="true">
joequincy
  • 1,395
  • 10
  • 21
  • tried it, not luck. My problem is that if I press the play button the video wont play... but if I press the time bar, the video plays... – Goaler444 Nov 11 '12 at 00:20
  • Do you have any Javascript interacting with (or CSS styling on) the controls? – joequincy Nov 11 '12 at 00:27
  • And which version of Firefox do you have running? – joequincy Nov 11 '12 at 00:31
  • version 16.0.2 (Its telling me its up to date.) – Goaler444 Nov 11 '12 at 00:37
  • 1
    Bring up the web console (CTRL-Shift-K) then reload the page. Click on the play button and see if there's an error (don't worry about the MP4 error, that's expected, and is why you have the WEBM source tag following it) – joequincy Nov 11 '12 at 00:48
0

Convert video to .ogg and include that as well.

MikeSmithDev
  • 15,731
  • 4
  • 58
  • 89
  • that should work yes. There are online converters you can find by googling. – MikeSmithDev Nov 10 '12 at 23:48
  • Well this is very strange... When I press the play button, the video does nothing, but if I click on the time bar, the video plays at that time and continues without a problem.. – Goaler444 Nov 11 '12 at 00:12
  • anyone ever figure this out?.. im having the same problem .. have .ogg first in list of sources.. still no luck – tallgirltaadaa Sep 28 '15 at 12:15
0

Chances are video format is not supported by mozilla. Just renaming the file as that video type might not be right.

Check the video format supported by mozilla - a link!

Sandeep Shabd
  • 721
  • 7
  • 10
  • You can look at the video element's `networkState` property to see whether any of the sources have loaded. If the value is `HTMLMediaElement.NETWORK_NO_SOURCE` then they all failed to load. – Neil Nov 10 '12 at 23:56
  • Network State on the video tag is 1. HTMLMediaElement.NETWORK_NO_SOURCE is 3. – justdan23 Dec 20 '18 at 21:33