How to set the thumbnail image on HTML5 video?

前端 未结 7 975
失恋的感觉
失恋的感觉 2020-11-30 20:38

Is there a way to set thumbnail image on HTML5 video? I want to see some pictures before play. My code looks like this:

7条回答
  •  悲&欢浪女
    2020-11-30 21:01

    That seems to be an extra image being shown there.

    You can try using this

    image
    /* write your code for the video here */
    

    Now using jQuery play the video and hide the image as

    $('img').click(function () {
      $(this).hide();
      // use the parameters to play the video now..
    })
    

提交回复
热议问题