How to get HTML5 video thumbnail without using poster on safari or iOS?

前端 未结 4 2144
春和景丽
春和景丽 2020-12-06 18:08

I have embedded HTML5 video with mp4 format. How to get thumbnail image like poster without using \"poster\" attribute. This problem coming on Safari and iOS. I have added v

4条回答
  •  长情又很酷
    2020-12-06 18:45

    simply add preload="metadata" in video tag and set #t=0.1 at url src, it will get the frame of 0.1s of your video as thumbnail

    however, the disadvantage of this solution is when you click to play the video, it always start at 0.1s

    
    

提交回复
热议问题