Detect if HTML5 video is playing or paused and show or hide a Div accordingly

前端 未结 3 771
时光说笑
时光说笑 2020-12-21 14:55

I have a html5 video which is background of my website, and on that video i am placing some text like Welcome to blah blah blah.....

Initially the video will not be

3条回答
  •  渐次进展
    2020-12-21 15:32

    There is a "play" event, which fires when the video begins playing, and a "pause" event that fires when the video is paused.

    Alternatively, the "paused" property will be false when the video is playing and true when it is not.

提交回复
热议问题