Dynamically using the first frame as poster in HTML5 video?

Did you try the following?

just append time in seconds #t={seconds} to source URL:

  <video controls width="360">
    <source src="https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4#t=0.1" type="video/mp4" />
  </video>

I have chosen a fraction of second (0.1) to keep number of frames small, because I have the suspect that if you put 1 second, it would “preload” the first 1 second of video (i.e. 24 frames or more ….). Just in case …

Works fine on Chrome and Firefox on desktop 🙂
Works not on Android mobile, though 🙁
I did not test on iOS, iPhone, IE yet ??

Edit May 2021:

I realized that many modern browsers now show automatically a poster of first frame.

Seems like they heard us 🙂

Leave a Comment