Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Video Poster Not Displaying Safari

Tags:

html

video

safari

My video poster appears in Chrome / Firefox but is not displaying in Safari. My play button appears and I can play the video, but the poster is a no show. Mark up is below. Any thoughts?

         <video id="video" controls poster="/assets/img/background/simon.jpg">
           <source src="/assets/img/video/want-it.webm"
                   type='video/webm;codecs="vp8, vorbis"'/>
           <source src="/assets/img/video/want-it.mp4"
                   type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"'/>
          <object data="" type="" class="simon">
            <img src='/assets/img/background/simon.jpg' title="Your browser does not support video">
          </object>
         </video>
like image 265
morocklo Avatar asked Dec 04 '25 01:12

morocklo


1 Answers

I solved that issue by adding #t=0.001 at the end of the file's URL inside <video> tag.

<video>
  <source src="path-to-video.mp4#t=0.001" type="video/mp4" />
</video>

Check this for more info.

like image 111
johannesMatevosyan Avatar answered Dec 05 '25 15:12

johannesMatevosyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!