Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 <video> tag in Chrome doesn't work

Tags:

I have noticed a strange problem with the HTML5 <video/> tag in Chrome.

Using this, it works fine:

<video poster="023.png" autoplay controls> <source src="todojunto.mp4" type="video/mp4"  /> </video> 

This only plays the sound, no video:

<video poster="023.png" autoplay > <source src="todojunto.mp4" type="video/mp4"  /> </video> 

If I remove the poster attribute, it works again.

All other browsers (even IE9...!) works perfectly, and I can't seem to find the reason.

Any ideas/help?

Thanks

like image 582
Borja Avatar asked May 25 '12 15:05

Borja


People also ask

Why is HTML5 video not working?

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.

Does the Chrome support video tag in HTML?

The <video> element is supported by all modern browsers. However, not all browsers support the same video file format. MP4 files are the most widely accepted format, and other formats like WebM and Ogg are supported in Chrome, Firefox, and Opera.

Why is my video tag not working?

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.


2 Answers

Video tag's attributes should be specified for strict standard implementation:

<video poster="023.png" autoplay="autoplay" controls="controls">     <source src="todojunto.mp4" type="video/mp4"  /> </video> 

If this doesn't work, there is something changed in your browser's preferences

like image 135
micnic Avatar answered Sep 23 '22 20:09

micnic


I'm surprised your video even shows up. Chrome stopped supporting mp4. You should use a .webm file when working with Chrome for html5 videos.

like image 34
mpb Avatar answered Sep 23 '22 20:09

mpb