Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML 5 Video tag not working for any browser

So I used AnyConverter do convert a .mov to .mpf, .ogv and .webm formats. I then put them in a video directory and used the following code

 <video width="500" height="281">
    <source src="/video/video.mp4" type="video/mp4" />
    <source src="/video/video.ogv" type="video/ogg" />
    <source src="/video/video.webm" type="video/webm" />
</video>

However, the video does not show in Sarari, Chrome or Firefox newest versions. I'm using the HTML 5 Doctype and not sure what is happening. Any suggestions?

EDIT

Odd, I changed the path to the full url and it still did not work. Then when I pasted the url in Firefox the video played. I wonder if its something outside of the video tag...

like image 457
Naterade Avatar asked May 12 '14 15:05

Naterade


People also ask

Why does my browser not support HTML5 video?

If your browser error "HTML5 video file not found", it means that your browser is not up to date or website pages does not have a suitable video codec. It would help if you communicated with the developer to solve the issue and install all the required codecs.

Why is my video tag not working in HTML?

There are 3 things to check: make sure your video files are properly encoded for web delivery. make sure the server where the videos are hosted is properly configured for web delivery. make sure your others scripts on the page do not interfere with video playback.

Is HTML5 supported by all browsers?

HTML5 is now compatible with all popular browsers (Chrome, Firefox, Safari, IE9, and Opera) and with the introduction of DOCTYPE, it is even possible to have a few HTML features in older versions of Internet Explorer too.

Is video tag supported in HTML5?

Like all other HTML tags, the <video> tag supports the global attributes in HTML5.


2 Answers

Make sure your path is correct for video files. rest of the code is fine

Add Controls Attribute on Video Tag like: Here is the full reference http://www.w3schools.com/html/html5_video.asp

<video width="500" height="281" controls>
    <source src="/video/video.mp4" type="video/mp4" />
    <source src="/video/video.ogv" type="video/ogg" />
    <source src="/video/video.webm" type="video/webm" />
</video>
like image 101
Neha Shah Avatar answered Nov 05 '22 07:11

Neha Shah


Add controls attribute on video node

Example:

<video width="500" height="281" controls>
   ...
   ...
</video>
like image 43
Siva Charan Avatar answered Nov 05 '22 09:11

Siva Charan