I am using video tag of HTML5 (http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_video_all). But before playing the video it shows the very first second of the video as the image; however, that image is solid black for my case; so I would like to know if I can have the default image (before hitting the play button) from somewhere of the middle of the video?
I hope my question is clear, if it is not clear please ask me what part is ambiguous and I will provide more clarification
Appreciate it in advance.
Assuming you have an image file with the part of the video you want yo show, you can use the poster
attribute on the <video>
tag, in your case it'd be:
<video width="320" height="240" poster="<default image url>" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With