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

前端 未结 4 2143
春和景丽
春和景丽 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:29

    Source: How to set the thumbnail image on HTML5 video?

    This worked for me:

    thumbnail
    /* code for the video goes here */
    

    Now using jQuery play the video and hide the image as

    $("img").on("click", function() {
      $(this).hide();
      // play the video now..
    })
    

提交回复
热议问题