Click the poster image the HTML5 video plays?

前端 未结 7 1827
死守一世寂寞
死守一世寂寞 2020-12-01 00:35

I have an HTML5 video with a poster attribute. I would like to somehow set it up so that you can click on anywhere on the video element (the area of the poster image) and it

7条回答
  •  情歌与酒
    2020-12-01 01:28

    Yes, that sounds like a regular feature the browser creators or html spec writers just "forgot".

    I've written a couple solutions but none of them are truly cross browser or 100% solid. Including problems with clicking on the video controls has the unintended consequence of stopping the video. Instead I would recommend you use a proven solution such as VideoJS: http://videojs.com/

提交回复
热议问题