I came up with this idea and it works great. So, basically we want to get rid of the first frame of the video from the screen, and then change the poster size to the actual video size. If we then set the dimensions, we have completed one of these tasks. Then only one remains. So now the only way I know to get rid of the first frame is to actually define the poster. However, we are going to give a fake video, which is not. This will create a blank display with a transparent background. That is, our parent background div will be visible.
Easy to use, however, it may not work with all web browsers if you want to change the background size of the div to the size of the video, as my code uses "background-size".
HTML / HTML5:
<div class="video_poster"> <video poster="dasdsadsakaslmklda.jpg" controls> <source src="videos/myvideo.mp4" type="video/mp4"> Your browser does not support the video tag. </video> <div>
CSS
video{ width:694px; height:390px; } .video_poster{ width:694px; height:390px; background-size:694px 390px; background-image:url(images/myvideo_poster.jpg); }
Jonathan J Mar 15 '13 at 0:09 2013-03-15 00:09
source share