HTML5 Video Autoplay Loop - Unwanted small delay - html

I have a question about looping MP4's. I have some small MP4 files that have to keep looping (which works great with "autoplay loop". However, after each play, there seems to be a very short delay before it plays again. Is there a way to avoid this? My code is as follows:
<div align="center">
<video autoplay loop class="img-responsive">
<source src="vid/01.mp4" type="video/mp4">
<source src="vid/01.webm" type="video/webm">
</video>
</div>

With poster attitude you can show a thumbnail before it starts.
<video controls poster="/images/w3html5.gif">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

Related

Video doesn't play on site but it does somewhere else

I'm working on a website with a HTML5 video tag. The video doesn't play on the website. But if I test it somewhere else, it plays without a problem.
http://carflow-staging.houston-1.hybridmedia.be/
My code is here:
<video class="video-splash__video" width="720" height="405" autoplay="" poster="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/img/videoCarflowBackground.png">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.mp4" type="video/mp4">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.ogg" type="video/ogg">
<source src="http://carflow-staging.houston-1.hybridmedia.be/wp-content/themes/framework_wp/video/videoCarflowBackground.webm" type="video/webm">
Your browser does not support the video tag or the file format of this video.
</video>
What could be the issue?

Why does my video only play sound and no video?

Just wondering if anyone can tell me hy this is happening. When I play the video I can hear the audio but the video doesn't show. Heres my code, im a beginner
<video id = "videoplayer" width ="480" height = "270" poster = "../images/video.jpg" controls>
<source src = "../media/overwatch.mp4">
<video>
Try to use this default snippet - I think you missed the type of the video and check the src!
For more info read this.
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

how to change a preview for html5 video?

how to change a preview for html5 video?
I need to show custom image, when user clicks on it video is playing.
<video controls="controls">
<source src="1.webm" type="video/webm">
<source src="1.mp4" type="video/mp4">
</video>
add poster attribut to video tag...
<video controls="controls" poster="url_to_img.jpg">
<source src="1.webm" type="video/webm">
<source src="1.mp4" type="video/mp4">
</video>
to set the preview of the HTML5 video you must know about poster attribute in video tag.
So it should look something like this
<video width=blah height=blah poster=blah >

Cross-browser HTML5 video compatibility not working with multiple video formats

I have the different video files in the HTML <video> tag like so :
<video autoplay="" id="video" preload="auto" style="display: inline-block;">
<source src="../register.mp4" type="video/mp4">
<source src="../register.webm" type="video/webm">
<source src="../register.ogv" type="video/ogg">
</video>
But for some reason, in chrome it doesn't work. It only works if I get rid of the MP4 source, but then it doesn't work in IE... not sure what's going on here or the best way to approach this.
I have already gotten passed the step of creating video files for all browsers as suggested in this question, but it has not solved my issue.
The order in which you list the sources matters. In Chrome, once the .MP4 video fails to load, the other sources don't even bother trying to load, so just by putting the .MP4 source as the last source element it fixed everything.
<video autoplay="" id="video" preload="auto" style="display: inline-block;">
<source src="../register.webm" type="video/webm">
<source src="../register.ogv" type="video/ogg">
<source src="../register.mp4" type="video/mp4">
</video>

Synchronizing two looping HTML5 videos

I have two MP4 videos running with the HTML5 video tag.
<video width="640" height="480" loop>
<source src="a.mp4" type="video/mp4">
</video>
<video width="640" height="480" loop>
<source src="a.mp4" type="video/mp4">
</video>
The two videos are identical so they have the exactly same number of frames and the same frame rate. Even I force them to start at the same time, they get out of synchronization over time. Is there any way to synchronize both videos? Even animated GIF is fine if it can be synchronized.